Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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
    thanks

    #1083268

    can 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

    #1083297

    Hi 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, 9 months ago by czar.
    #1083466

    i’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 385

    maybe we could get a filter here too on future versions. ;)

    #1083654

    Yes 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, 9 months ago by czar.
    #1083672

    if you don’t want to loose this on updating enfold – as i said – make a copy to your child-theme – described here : Link

    #1083690

    I 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);
    #1084327

    on 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 ;)

    #1084595

    Hi Guenni, in gallery_horizontal.php is at line 385
    $lightbox = wp_get_attachment_image_src($attachment->ID, 'full');

    #1084604

    does 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.

    #1085024

    I followed your advice and made a copy in child-theme. I hope developers make these changes.
    Thanks for all your help Guenni

    #1085812

    Hi 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,
    Rikard

    #1085876

    Thanks Rikard, close this topic as well

    #1086326

    Hi,

    Thanks for letting us know, I’ll close this for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘about lightbox’ is closed to new replies.