-
AuthorPosts
-
March 26, 2019 at 7:56 pm #1083232
Hi, I have a big problem with lightbox because it does not enlarge enough the images presented with gallery + thumbnails. In some cases the landscape image in lightbox is smaller or equal to the original. Images are loaded with dimensions of 2880×1620.
I had already asked for a solution long ago, I was recommended this snippet but it doesn’t work:
function enfold_customization_change_popup_size( $size ) { return 'fullsize'; } add_filter( 'avf_avia_builder_masonry_lightbox_img_size', 'enfold_customization_change_popup_size' ); function avia_change_gallery_thumbnail_link($size){ return "full"; } add_filter('avf_avia_builder_masonry_lightbox_img_size', 'avia_change_gallery_thumbnail_link', 10, 1); function change_lightbox_size() { return "full"; } add_filter('avf_avia_builder_helper_lightbox_size','change_lightbox_size', 10);
Example gallery and access token in private data
thanksMarch 26, 2019 at 9:36 pm #1083268can you try this:
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);
your code should work too – i have that on my memory board for enfold too – but maybe this will do the job for you
March 27, 2019 at 12:00 am #1083297Hi Guenny with gallery element works fine, but not with horizontal gallery and masonry.
In private data link at example whith horizontal gallery and masonry.
thanks again- This reply was modified 5 years, 6 months ago by czar.
March 27, 2019 at 7:41 am #1083466i’m participant as you are – so i do not see private content – sorry
what i see is that gallery.php got that filter: avf_avia_builder_gallery_image_link
gallery_horizontal.php not.you see on line 385 gallery_horizontal.php that setting to “large” – so for now it would be possible to have a copy of that alb element on your child-theme/shortcodes folder with
$lightbox = wp_get_attachment_image_src($attachment->ID, 'full');
on that line 385maybe we could get a filter here too on future versions. ;)
March 27, 2019 at 3:13 pm #1083654Yes Guenni, it works perfectly. I have modified line 385 of gallery_horizontal.php
from
$lightbox = wp_get_attachment_image_src($attachment->ID, 'large');
to
$lightbox = wp_get_attachment_image_src($attachment->ID, 'full');
thanks
- This reply was modified 5 years, 6 months ago by czar.
March 27, 2019 at 3:43 pm #1083672if you don’t want to loose this on updating enfold – as i said – make a copy to your child-theme – described here : Link
March 27, 2019 at 4:07 pm #1083690I use “Code Snippets” plugin but I don’t understand how to transform this modification to apply, maybe so?
function avia_change_gallery_thumbnail_link($link, $attachment, $atts, $meta) { $lightbox = 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);
March 28, 2019 at 11:54 pm #1084327on horizontal galery there is not filter to apply:
what i see is that gallery.php got that filter: avf_avia_builder_gallery_image_link
gallery_horizontal.php not.so – maybe next update a dev member could implement such a filter ;)
March 29, 2019 at 2:56 pm #1084595Hi Guenni, in gallery_horizontal.php is at line 385
$lightbox = wp_get_attachment_image_src($attachment->ID, 'full');
March 29, 2019 at 3:41 pm #1084604does it work you described it here: https://kriesi.at/support/topic/about-lightbox/#post-1083690 ?
on gallery.php you got :
$link = apply_filters('avf_avia_builder_gallery_image_link'
etc
that is the reason for that filter hook works on gallery.March 31, 2019 at 7:36 am #1085024I followed your advice and made a copy in child-theme. I hope developers make these changes.
Thanks for all your help GuenniApril 2, 2019 at 4:24 am #1085812Hi czar,
Thanks for the update. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardApril 2, 2019 at 7:09 am #1085876Thanks Rikard, close this topic as well
April 3, 2019 at 4:37 am #1086326 -
AuthorPosts
- The topic ‘about lightbox’ is closed to new replies.