-
AuthorPosts
-
November 30, 2022 at 1:06 am #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.
December 1, 2022 at 4:56 am #1374554Hey 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,
IsmaelDecember 1, 2022 at 7:49 am #1374565Ismael, 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.
December 2, 2022 at 8:35 am #1374730Hi,
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,
IsmaelDecember 2, 2022 at 6:51 pm #1374821That works perfectly. Problem solved, thank you!
December 3, 2022 at 10:13 am #1374872Hi hmsvictory,
I’m glad that Ismael could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Masonry Gallery – Help Me Control Image Size’ is closed to new replies.