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');
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
Thanks for the suggestion but this doesn’t seem to make a difference.
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
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+\./,'.');