How to remove Zoom lightbox on Photos

  • What’s your URL? This is the easiest way for others to help you
    healthzam.com
  • What version of Ghost are you using? If it’s not the latest, please update Ghost first before opening your topic
    3

I just want to remove the behavior in posts that when i click an image it zooms in in a lightbox. It is not necessary and interfering with my pinterest image post code.

Hi @mlolm,
I checked your theme. Fluidbox, a jQuery plugin for beautiful lightboxes is used for your theme for lightbox.

You can remove the lightbox yourself.

  1. Open your theme file
  2. Go to assets/js/main.js
  3. Go to line number 119 and remove this:
    // Add classes and attributes for Fluidbox library
    $('.post-content img').each(function(index, el) {
        if (!$(this).parent().is("a") && !$(this).hasClass('error')) {
            $( "<a href='" + $(this).attr('src') + "' class='zoom'></a>" ).insertAfter( $(this) );
            $(this).appendTo($(this).next("a"));
        };
    });

    $('.zoom').fluidbox();
  1. Go to line number 131 and remove this line $('.zoom').fluidbox('close');
  2. Re-zip your theme file and upload
  3. Reload your site again and enjoy :hugs:

See attached

Best Regards
Enamul Haque
CEO
Electronthemes

1 Like