• Tips
  • Widgets
  • Blogger
  • Windows
  • Tools

How to Fix Broken Image Links and Hide It using JQuery

Follow Qurkx on Facebook
Never miss an update – join 15K+ followers
Follow

blogger-logoImages really play an important role in getting readers more into what they are reading. Using images one can easily express every big matter using a simple smiley in that same way adding images can show what you actually want to say in that particular post. Well we have posted many blogger image based tutorial’s in the past related to making image’s 100% fit to blog’s width and even adding that awesome image fading effect to your post images.

Well today I will be posting on how you can easily remove those broken image links that might not load and show some error messages, well that actually looks bad, so what we are going to do is to remove all those image by hiding them using a simple jquery code, that’s pretty easy.

  1. Open Blogger > Template > Edit HTML.
  2. Press Ctrl + F and search for </head> tag & paste below code above it.

    <script>
    $(document).ready(function(){
    $("img").error(function(){
    $(this).hide();
    });  
    })
    </script>

  3. That’s it now just save the template & its done.

Well now the code is placed and it will automatically scan for all the broken images and then hide them automatically from your post.

Explaining the whole code ?

Well if you wanna know how exactly this code is working, then here you go, well the $(document).ready(function()) code says the function to execute when the page loads and now to find the images we use the $("img") code, now to check for the error’s error(function()) code is used. Now the last one which is the key code to this one is the $(this).hide(); code that simply hides that image.

Join Qurkx on Telegram
Join Free Now →

Trending Now

  • Blogger Conditional Tags b:if and b:else for More Blog Customizations
    Blogger Conditional Tags b:if and b:else for More Blog Customizations
  • 10 Essential Free Blogging Tools & Services Every Blogger Needs in 2026
    10 Essential Free Blogging Tools & Services Every Blogger Needs in 2026
  • Watch Indian Television Channels using VLC Media Player
    Watch Indian Television Channels using VLC Media Player
  • Upcoming Hollywood Action Movies Releasing in 2026 & Beyond
    Upcoming Hollywood Action Movies Releasing in 2026 & Beyond
  • Top 9 Websites for Watching Movies Streaming Online for Free
    Top 9 Websites for Watching Movies Streaming Online for Free
  • Prank your Friends with BOMBitUP SMS Bomber Android Application
    Prank your Friends with BOMBitUP SMS Bomber Android Application
  • Naughty 18+ NON-VEG Jokes for WhatsApp and Facebook
    Naughty 18+ NON-VEG Jokes for WhatsApp and Facebook
About UsContactPrivacy PolicyTerms of ServiceDisclaimer
© 2011 - Qurkx // The Digital Collective