Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1374385

    I am using the Masonry Gallery element to display my product photos. Here is an example:

    I am uploading images that are usually 2000 x 1325 pixels. I want those to be the images displayed when you click a thumbnail and pop up the full size image. Instead my thumbnails are linking to 1280 pixel versions of the original uploaded files:

    https://originalvintageguitars.com/wp-content/uploads/2022/11/1951-gibson-es-350-014-1280×848.jpg

    These images are much smaller and lower quality. I have my gallery set to “No Scaling”. Tell me what I am doing wrong? I am also using the wordpress plugin Optimus Image Optimizer, but I don’t think that decreases the pixel size of the images.

    #1374554

    Hey hmsvictory,

    Thank you for the inquiry.

    You can use this filter in the functions.php file to adjust the size of the lightbox image for the masonry gallery element.

    function avf_avia_builder_helper_lightbox_size_mod() {
        return "full";
    }
    add_filter('avf_avia_builder_helper_lightbox_size','avf_avia_builder_helper_lightbox_size_mod', 10);

    This should display the lightbox image in its original size.

    Best regards,
    Ismael

    #1374565

    Ismael, I added the filter to functions.php. The existing products still display the 1280 pixel images. Will the changes only apply to newly created masonry galleries? Where is the 1280 size coming from?

    Edit: I just tried to add a new masonry gallery with new images and they are still popping up as 1280 pixel images. I also cleared the cache plugin.

    • This reply was modified 1 year, 10 months ago by hmsvictory. Reason: tried a solution that didn't work
    • This reply was modified 1 year, 10 months ago by hmsvictory.
    #1374730

    Hi,

    This should work for existing masonry items. We adjusted the filter a bit. Please try it again.

    function avf_alb_lightbox_image_size_mod($lightbox_img_size, $context) {
        return $context == "avia_masonry" ? "full" : $lightbox_img_size;
    }
    add_filter('avf_alb_lightbox_image_size','avf_alb_lightbox_image_size_mod', 10, 2);
    

    Best regards,
    Ismael

    #1374821

    That works perfectly. Problem solved, thank you!

    #1374872

    Hi hmsvictory,

    I’m glad that Ismael could help you :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Masonry Gallery – Help Me Control Image Size’ is closed to new replies.