Create Template:HiddenH2 by copy-pasting everything in the box below. Display the image heading normally - [[File:Image.png|link=]] - on the line just below {{HiddenH2|Title}}

<h2 style="border-bottom:none; line-height:1px; margin-top:10px"><span style="font-size:0px">{{{1}}}</span></h2>
This template is used in conjunction with using images as section headings - <code><h2></h2></code> - while still having a normal table of contents.

To use it, enter <code>{{HiddenH2|Title}}</code> and replace <code>Title</code> with the title of the section.