Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #686194

    How do I keep my images from being downsized and show the original uploaded size? For instance I am uploading images at 1920 x 1080 and they are much smaller when opening in the Enfold lightbox using the Gallery. Thank you!

    #686565

    Hello; I’m having the same problem. I’ve already applied a fix from a previous post, and I can see it’s trying to work, but the Gallery is grabbing a smaller version instead of the full size so it can’t work the way it should. Added to CSS:
    img.mfp-img{
    max-height:90% !important;
    }
    The lightbox is showing “MYIMAGE-1030×443.jpg” instead of “MYIMAGE.jpg” (Which is comical because it’s smaller than the in-page version.)
    Link to issue in action: http://thesource.us.tempcloudsite.com/photo-gallery/

    Thanks for your help!

    #686588

    put this to functions.php of your child-theme:

    for Masonry Images

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

    for gallery Images:

    function change_lightbox_size() {
        return "full";
    }
    add_filter('avf_avia_builder_helper_lightbox_size','change_lightbox_size', 10);

    per Enfold it is set to return “large”

    • This reply was modified 8 years, 2 months ago by Guenni007.
    #686609

    Thanks Guenni007… tried both, but didn’t work for me.

    #686651

    Thanks Guenni007, unfortunately it did not work for me either.
    Pixelbiz – my lightbox is showing “MYIMAGE-1024×576.jpg” instead, not sure where these sizes are set.

    #686772

    hm – you can see here on a custumer projekt that this is what you try to obtain: http://webers-testseite.de/art-varij/gemaelde/phoenix/

    if you look to the images in the lightbox there is no resize at all.

    img.mfp-img {
        height: auto;
        max-width: 100%;
        width: auto;
    }

    but these are the default settings. Those rules above are for the image to show in lightbox. And “full” means – no resize – original uploaded image.

    Only on linking to an iframe in a lightbox there has to be some corrections:
    f.e.

    .mfp-iframe-holder .mfp-content {
        left: 50%;
        max-height: 56vw !important;
        max-width: 80vw !important;
        position: absolute;
        top: 100px;
        transform: translate(-50%);
    }

    i can not see your site – so i only can make suggestions. But these are definitly the right rules for gallery-images and masonry-gallery images.

    #686777

    and this here seems to be ruling the popup window size:

    add_filter( 'avf_avia_builder_masonry_lightbox_img_size', 'enfold_customization_change_popup_size' );
    function enfold_customization_change_popup_size( $size ) {
      return 'fullsize';
    }

    but the code for showing the original image is in thread on top

    #686779

    Or do you use a third party lightbox (pretty photo etc. ) ?

    Or is it for woocommerce or shop-images

    #686826

    @raylay: first there are some imgSize Settings in WordPress itself (media.php) thumbnail, medium, large, full
    You can set up those sizes (full is the uploaded image itself) on dashboard/settings/media

    The other settings come from Enfold functions.php from line 136 (Register additional image thumbnail sizes)

    $avia_config['imgSize']['widget'] 			 	= array('width'=>36,  'height'=>36);						// small preview pics eg sidebar news
    $avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    $avia_config['imgSize']['featured'] 		 	= array('width'=>1500, 'height'=>430 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['featured_large'] 		= array('width'=>1500, 'height'=>630 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['extra_large'] 		 	= array('width'=>1500, 'height'=>1500 , 'crop' => false);	// images for fullscrren slider
    $avia_config['imgSize']['portfolio'] 		 	= array('width'=>495, 'height'=>400 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['portfolio_small'] 		= array('width'=>260, 'height'=>185 );						// images for portfolio 4 columns
    $avia_config['imgSize']['gallery'] 		 		= array('width'=>845, 'height'=>684 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['magazine'] 		 	= array('width'=>710, 'height'=>375 );						// images for magazines
    $avia_config['imgSize']['masonry'] 		 		= array('width'=>705, 'height'=>705 , 'crop' => false);		// images for fullscreen masonry
    $avia_config['imgSize']['entry_with_sidebar'] 	= array('width'=>845, 'height'=>321);		            	// big images for blog and page entries
    $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize'] = apply_filters('avf_modify_thumb_size', $avia_config['imgSize']);

    on avia-template builder / shortcodes / there are av-helper-masonry.php line 511 set image-size of lightbox to “large”
    on gallery.php line 173 set image-size to “large”

    #687078

    Thanks for your help Guenni007! You solved it for me!!
    The main issue was that we are telling the Gallery to show “No Scaling (Original Width x Original Height)” but it’s still delivering a “large” version, “IMAGE-1030×443.jpg” >> So, your last suggestion of going to “themes/enfold/config-templatebuilder/avia-shortcodes/gallery.php” and on line 173 change “large” to “fullsize” worked for me. (Now the CSS resize to 90% can do its thing.) THANK YOU!!

    #687105

    Hey!

    Happy you got it solved!
    Please do let us know if we can do anything else for you, we will be more than happy!

    Thanks a lot

    Best regards,
    Basilis

    #687111

    yes but this should do the trick if placed in Child-Theme functions.php

    function change_lightbox_size() {
        return "full";
    }
    add_filter('avf_avia_builder_helper_lightbox_size','change_lightbox_size', 10);
    #687189

    Thank you all for the help. Adding the code to the child theme functions.php didn’t work, but updating it in the gallery.php did. Thanks again!

    #687356

    hm – if you test it –
    i managed it allways this way and it works – you can see the line 23 to 27 in generic-helper.class.php if link is lightbox than the image in lightbox is the large one.

    Your other settings in child-theme functions.php are ok ?

    #688045

    Hi @raylay,

    Great, glad you got it working :-)

    Thanks for everyone helping out in the thread!

    Regards,
    Rikard

    #691050

    Well, I’m just now seeing that even though I ask for fullsize image to show, the css style style="max-height: 1085px;" is still being added. How can I remove this?

    Guenni007 – thanks for all your help. Unfortunately when I add the code to my child-theme functions.php it does not update. I wish I knew what was going on because Theme updates replace my mods in the original functions, argh!!

    Thanks!

    #692593

    @raylay
    Would you mind providing a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)
    Did you regenerated your thumbnails already?

    Best regards,
    Andy

    #693405

    http://chrisgallop.com/portfolio-item/orc/ – Example: if you click the main image the lightbox does not load it at 900 x 1600.

    Thanks for the help!

    #693753

    Hi,

    use this code:

    img.mfp-img {
    height: 1600px;
    max-height: 1600px !important;
    }
    

    Best regards,
    Andy

Viewing 19 posts - 1 through 19 (of 19 total)
  • You must be logged in to reply to this topic.