Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #432615

    Hello Team Enfold.

    A while back I got the following quick css from Elliot to change the aspect ratio if the thumbnails in the blog overview.

    .blog-meta, .blog-meta a, .blog-meta img {
    width: 220px !important;
    max-width: 220px !important;
    max-height: 170px;
    height: 170px;
    border-radius: 0px !important;
    }

    I really like the size the images have now. But the images get stretched even if they are large enough. Also if i upload an image that is 220 170 it gets stretched. And facebook sharing doesn’t work with images under 200 x 200.

    So how do I stop the stretching?

    cheers

    #433124

    Hey WolfvanHaeren!

    Send us a link to your page and take a screenshot highlighting what your trying to do so we can get a better idea.

    You can set your reply as private if you wish.

    Regards,
    Elliott

    #433287
    This reply has been marked as private.
    #434232

    Hey!

    It’s being resized to 180 x 180 but your forcing it with CSS to 220 x 220.

    You can change the size on line 118 in the functions.php file.

    $avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    

    And then regenerate your thumbnails, http://wordpress.org/extend/plugins/regenerate-thumbnails/.

    Best regards,
    Elliott

    #435856

    thank you, this works great!!

    #435925
    This reply has been marked as private.
    #436636

    Hi!

    Edit includes > related-posts.php. Look for these codes:

    'image_size' => 'square',
    

    Replace ‘square’ with a different thumbnail size. The name of the thumbnail size is located on functions.php:

    $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

    #436778

    Hello Ismael,
    I’m sorry but don’t really understand. Just to be safe.

    If I go to related posts and replace ‘square’ with something new like ‘relatedpost_imagesize’

    Then I go to functions.php and create a new line(Is this correct??)

    $avia_config[‘imgSize’][‘relatedpost_imagesize’] = array(‘width’=>180, ‘height’=>180); // small image for related posts blogs

    Or

    Do I replace ‘Square’ in the relatedposts.php with ‘widget’ and does that work?

    And

    How will these be generated?

    cheers

    #437311

    Hey!

    Yes, you can add your own thumbnail size or use the existing thumbnail sizes. Regenerate the thumbnails afterwards. http://wordpress.org/extend/plugins/regenerate-thumbnails/

    Cheers!
    Ismael

    #461189

    Hello Ismael.
    How would I add a new image size to the childs function php? I copied the related-post.php to child/includes.
    cheers

    #461274

    Hey!

    Please add following code to Functions.php file of your child theme in Appearance > Editor

    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
            $size['portfolio'] 		 	= array('width'=>495, 'height'=>400 );		
    	return $size;	
    }

    and then change width and height values as needed and then regenerate thumbnails using this plugin – https://wordpress.org/plugins/regenerate-thumbnails/

    Cheers!
    Yigit

    #461389

    Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Aspect ratio blog thumbnails’ is closed to new replies.