In this blog post, I will show you how to hide the thumbnail image on Blogger. If your post has no image, Blogger shows a default one. This trick will help you hide that image easily.
If you're using Blogger, you might have noticed that there’s no built-in option to hide the thumbnail image for specific posts — unlike WordPress, where you can easily remove or control featured images for each post.
In Blogger, when a post doesn't have a real image, themes often show a default or dummy image (like nth.png).
This can look unprofessional, especially if you're displaying posts in a grid or list format.
I Fix this – Using a Small JavaScript Snippet
To solve this, I wrote a small JavaScript that automatically hides the thumbnail section if a post is using a dummy image.
Look at the images below to see how the code works. They show what happens before and after the dummy image is hidden.
Step 1: Copy This Code
Paste this code just before the </body> tag in your Blogger theme:
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('.post-image-wrap').forEach(function (wrap) {
const img = wrap.querySelector('img');
if (!img) return;
const dummyName = "nth.png"; // Your dummy image name
if (img.src.includes(dummyName)) {
wrap.style.display = "none";
}
});
});
</script>
Step 2: Make Sure You Use This Wrapper in Your Theme
For this to work, your image section in the post list should look something like this:
<div class="post-image-wrap">
<img src="..." />
</div>
If your theme uses a different class, change .post-image-wrap in the script to match.
Now whenever a post uses the dummy image (nth.png), the image section will be automatically hidden. Only real thumbnails will show — no more empty placeholders or unwanted images!
Just remember one thing: because of how Blogger works, this code only hides the thumbnail when you don't add any image in your blog post. If you add any image, Blogger will use it as the thumbnail by default.
Conclusion:
Hiding unwanted thumbnail images in Blogger is not easy by default, but with this simple JavaScript trick, you can make your blog look cleaner and more professional. It’s a quick fix that helps you control how your posts appear, especially when no real image is added. Try it out and keep your design neat!
0 Comments