Disable Lightbox View The Correct way

Update: Lightbox Effect is Offcially Disabled by Blogger. No Worries now.
Yesterday I shared a short code that somehow helped to deactivate and remove the lightbox view for images appearing on blogger blogs. However some of the technical problems linked with it was that you were asked to paste the code just below the closing body tag and technically speaking that is against W3C standards. This was one reason why some widgets and Adsense ads got effected and did not display correctly. I have found a much better way of dealing with this problem brought by blogger team and it is really easy to implement. So kindly delete the previous code that I earlier shared and follow this new one.

Disable Lightbox view in Blogger Easily

  1. Go To Blogger > Design
  2. Choose HTML/JavaScript Widget
  3. Paste the following code inside it
<script type="text/javascript"> //<![CDATA[ var lightboxIsDead = false; function killLightboxundefined) { if undefinedlightboxIsDead) return; lightboxIsDead = true; var images = document.getElementsByTagNameundefined'img'); for undefinedvar i = 0 ; i < images.length ; ++i) { images[i].parentNode.innerHTML = images[i].parentNode.innerHTML; } } if undefineddocument.addEventListener) { document.addEventListenerundefined'DOMContentLoaded', killLightbox, false); } else { document.attachEventundefined'onDOMContentLoaded', killLightbox); window.attachEventundefined'onload', killLightbox); } //]]> </script>
     4.  Save the widget and drag the widget anywhere to the bottom
     5.   you are all done!

Now this was a much neater and cleaner way. Which will work without disturbing the flow of other gadget on your blog. Happy blogging. enjoy! :)

Code Credits:Englishjavadrinker

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »


We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.
  1. Yess!! This Time it Works..
    :D Thanks a Ton Bro!! :D

  2. Hello Mohammad,
    Thank a lot for the quick response.

  3. Hi Mustafa i subscribe via email like 1 week ago but still can't recive facebook page template can you please send me a facebook page template @ darkracker@hotmail.com
    Thanks .. and i have a question blogger added light box but it's not working on any blog can you know why? and if is working agian there is any way to disable blogger light box?
    because i added many slideshow in my blogs and they are better then blogger light box...

  4. The source link is not correct bro

  5. thanx for your sharing brother but the script is not working check it again..............


  6. My thanks, Mohammad, for though I have seen sights where this script didn't work, it has save me! I'm sick to death of the mess Google is making of every web service it absorbs, and I was about to throw up my hands after days of work on a new blog before stumbled across you fix.

  7. A little more follow up... I notice one of my blogs where the fix didn't work. One particular post is still popping up the blogger light box. I used Blogger's one online post editor to do that one post, and the link anchors have a suspicious not-standard attribute...


    I don't know if this means anything, because I'm not that savvy with JS. Just thought I'd mention it, and maybe you or others here know if its a red herring or not.

  8. Last follow up... the following link may be of use to those who come looking for this fix...


    It's still pathetic that they install this for thousands as an opt out instead of an opt in, but at least now there's a setting to turn off this nonsense.