Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1175380


    I understand from this answer that now the images of the horizontal gallery open the large size on the lightbox. This wasn’t the case in the past if I’m not mistaken… And I think it doesn’t make sense to open a thumbnail on the lightbox. The thumbnail should be displayed when opening a page, to speed up the loading time, but when a user clicks on the lightbox, they want to see the original picture.

    How can I change that behaviour so the lightbox opens the full size of the image?


    Hey blancocapell,
    Thank you for the link, but this seems to be a regular gallery and not a “horizontal gallery” element. I have checked your gallery images in the lightbox and they are opening the original images such as /IMG_1068.jpg where the thumbnails are like these /IMG_1068-260x185.jpg
    Perhaps you thought it was a thumbnail because the image was contained in the viewable area of the lightbox?
    To extend it you could try this css:

    img.mfp-img,.mfp-image-holder .mfp-content {
        width: 100% !important; 
        height: 100% !important; 
        max-height: 100% !important;

    But the “horizontal gallery” element doesn’t open in a lightbox, the image is only enlarged within the container.

    Best regards,


    Hey Mike, thanks for answering.

    You are right, it’s not a horizontal gallery, but a regular gallery.

    Anyway, the issue is still there. For some reason, some images load the large thumbnail (1030px wide). For example, these ones: https://i.imgur.com/WhQg5BC.jpg
    Or if you change the language to Catalan, all of them will load the large thumbnail.

    Why is that?


    Hi blancocapell,

    It is the default behavior. The thumbs are shown small and the lightbox shows the big image. It is built like that. The gallery thumbs do not really take you to the actual page.

    Best regards,


    Hey Victoria,

    So you are saying that clicking on the gallery thumbnail will display the large thumbnail (1030px wide) instead of the full-size image? Why though? It doesn’t make sense. Go to any website and you will see that clicking on a thumbnail displays the full image. Say you are shopping online and you see the thumbnails of the product. Wouldn’t you want to see as many details as possible when clicking on an image?

    How can I change this behavior? It is kind of annoying because this was working properly time ago. Some update changed this; I’m not sure which one.

    Thank you,



    Thank you for the update.

    The large thumbnail is the default image size use in the lightbox container. If you want to adjust it, use the avf_avia_builder_gallery_image_link filter as described in the following thread.

    // https://kriesi.at/support/topic/thumbnail-size-in-galleries-2/#post-1142492

    The filter will replace large with full or the original image.

    Best regards,


    Thank you Ismael, it works flawlessly.

    For those who want to know the solution, you just need to add the following code to the functions.php file:

    function avia_change_gallery_thumbnail_link($link, $attachment, $atts, $meta){
        $link = wp_get_attachment_image_src($attachment->ID, "full");
        return $link;
    add_filter('avf_avia_builder_gallery_image_link', 'avia_change_gallery_thumbnail_link', 10, 4);


    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Change lightbox image size to full size’ is closed to new replies.