Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #580963

    Hi I’m having a problem with Enfold’s lightbox, I tried looking at the jquery files but the variables look like such gibberish to me.

    The problem is that this lightbox doesn’t show the full size image, sometimes the lightbox is actually smaller than the image displayed in the page (as is the case in my link), I want it to take advantage of all available window space to give the viewer the biggest image it can.

    I already tried this solution I found in some other thread but it didn’t make a difference:

    // lightbox fullsize
    function lightbox_fullsize(){
    ?>
    <script>
        jQuery(document).ready(function() {         
          jQuery('.avia-gallery-thumb').on('click',' a',function(){
             jQuery(document).find('.mfp-wrap figure img').css("max-height","");
             console.log(' child Lightbox img ');               
          });
        });
    </script>
    <?php
    }
    add_action('wp_head', 'lightbox_fullsize');
    #580966

    Hi morecolor!

    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';
    }

    Cheers!
    Yigit

    #581143

    Thanks for the suggestion but this doesn’t seem to make a difference.

    #582140

    Hey!

    The lightbox script uses the large thumbnail size by default so you have to adjust max width and height of the thumbnail. You can do that in the Settings > Media panel. Regenerate the thumbnails afterwards: https://wordpress.org/plugins/force-regenerate-thumbnails/

    Best regards,
    Ismael

    #584446

    I ended up forcing it to find the original image by adding this code in wp-content/themes/enfold/js/aviapopup/jquery.magnific-popup.js and re-minifying

    between line 591 and 592:
    item.src = item.src.replace(/\-\d+x\d+\./,'.');

    • This reply was modified 8 years, 1 month ago by morecolor.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Lightbox not showing full size’ is closed to new replies.