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

    the images in the lightbox are too small on big screens (should be the original size, if the screen is bigger).
    Example: the image size in the lightbox is 1030 x 734 pixels on a screen with 2560 x 1440 pixels.
    The original image size is 1920 x 1200 pixels.

    Is there a possibility, to change the parameters of the lightbox, and where can I do that?



    Hey webmanu!

    Please try adding following code to Functions.php file in Appearance > Editor

    add_filter( 'avf_avia_builder_masonry_lightbox_img_size', 'enfold_customization_change_popup_size' );
    function enfold_customization_change_popup_size( $size ) {
    	return 'fullsize';



    Thanks Yigit!



    glad Yigit could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.



    I’ve added that code…and it just isn’t working. I have just the basic gallery setup and the lightbox images are still showing smaller. But if I just use html to display an lightboxed image link, it takes up the whole screen…and all the images are the same size. I have no other code in my functions that messes with anything that has to do with Enfold, images and lightbox. No plugins that would.

    EDIT – I found the issue….it isn’t linking to the fullsize image using the gallery widget in the site builder. It still links to the large size…1030px. Even with that code in use. Does that code need updating to reflect any changes made in recent releases?

    • This reply was modified 5 years, 1 month ago by  Kahil.


    @kahil can you please start a thread and attach a link to your page and temporary admin logins in private content field?
    If you post them here, they will be visible to the OP as well.

    Best regards,



    I’ve tried the code but it doesn’t seem to work. I would like the images in the light box to always be loaded at the maximum size. I’d love to hear what I need to do to make this possible.

    Kind regards,

    Jarno Beelen


    @media-click sorry for the very late reply, typically the lightbox opens at the maximum size for the screen while also allowing for the padding of the top close button and the bottom info bar. The lightbox is not meant to extend the viewable space nor to be absolute full screen because the space around the lightbox is used as a clickable space to close the lightbox.
    So your lightbox should be like this:
    You can use custom css to override this, for example:

    img.mfp-img {
        width: 1200px !important; 
        max-width: 1200px !important;  
        height: 1976px !important;
        max-height: 1976px !important;

    but doing this may interfere with being able to use the close button or clicking to the side to close the lightbox, and may require scrolling.
    If this is not what you meant then please open a new thread so we can see a link to your site, as this is not your thread you will not see our comments in the Private Content area, if needed. This thread is from 2016 and it is always better to open new threads.

    Best regards,

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

You must be logged in to reply to this topic.