Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #425897

    Hi,

    First of all, since this is my first post: I love Enfold. It’s a great theme and money well spent.

    Now for my question:

    I’m using the slideshow version of ajax portfolio. However, the images my client will be uploading will have varying sizes (different proportions). What can I do to have them cropped automatically in the slideshow, but not in the lightbox? Is there a way to have them act like the css ‘background-size: cover;’ acts (so that they resize to fill a certain width and height and the center stays in the middle)?

    • This topic was modified 9 years, 7 months ago by SirValeq.
    #426190

    Hey SirValeq!

    Hmm, the slideshow in the AJAX preview should be sizing the images to fit inside the container automatically. Can you send us a link to your page and take a screenshot highlighting what your trying to do?

    Regards,
    Elliott

    #426657

    The images fill the width nicely, but I would also like them to fill a set height (i.e. 400px), even if that means that their sides will be cropped and they will be scaled up.
    In other words: I would like the slider in a portfolio element to behave like the fullscreen slider does, but with set dimensions that match the elements width (as they do now) but also some set height.

    (the link will be in the next private post)

    #426658
    This reply has been marked as private.
    #426924

    Hi!

    You can change the thumbnail size or the preview image size of the ajax slideshow with this on functions.php:

    add_action( 'avf_portfolio_preview_template_params', 'avf_portfolio_preview_template_params_mod', 10, 2 );
    function avf_portfolio_preview_template_params_mod($params, $entry) {
     if($params['method'] == 'slideshow') {
    	 $params['preview_size'] = 'gallery';
     }
     return $params;
    }

    Change the “preview_size” value which is currently set to “gallery” (845x684px). Select among these 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

    Best regards,
    Ismael

    #427123

    Thanks. The ‘magazine’ size is the right one for me. However, only half of my issue is solved.
    Images that are large enough are cropped and fit perfectly (that’s one half solved). But there is one image (the first slide in the same link) that is very wide but also short. It does scale up a bit, but not enough to fill even the ‘magazine’ thumbnail height. If it does scale at all, I guess it should be possible to make it scale all the way up, right?

    #427606

    Hey!

    You could use some CSS but it may look weird.

    .avia-slideshow-magazine ul, .avia-slideshow-magazine ul img {
      height: 700px !important;
    }

    In this case I think it would be best to limit the preview text or use a bigger image or an image with a better aspect ratio.

    Cheers!
    Elliott

    #991975

    Hi, I have the same problem as SirValeq. I only use Portrait images in the Ajax Portfolio and they are either too big (1st, 2nd and 3rd entry) or cropped (4th entry). I tried using the solution that Ismael provided but nothing happened. Could you help me?

    Thank you!
    Toni

    • This reply was modified 6 years, 3 months ago by zhou-geiger.
    #992569

    Hi,


    @zhou-geiger
    please create your own ticket, for us to be able to review

    Best regards,
    Basilis

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