-
AuthorPosts
-
April 22, 2015 at 8:17 am #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
April 22, 2015 at 9:11 pm #433124Hey 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,
ElliottApril 23, 2015 at 8:21 am #433287This reply has been marked as private.April 24, 2015 at 4:47 pm #434232Hey!
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,
ElliottApril 28, 2015 at 8:43 am #435856thank you, this works great!!
April 28, 2015 at 11:21 am #435925This reply has been marked as private.April 29, 2015 at 1:30 pm #436636Hi!
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,
IsmaelApril 29, 2015 at 4:04 pm #436778Hello 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
April 30, 2015 at 11:03 am #437311Hey!
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!
IsmaelJune 18, 2015 at 9:48 am #461189Hello Ismael.
How would I add a new image size to the childs function php? I copied the related-post.php to child/includes.
cheersJune 18, 2015 at 1:41 pm #461274Hey!
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!
YigitJune 18, 2015 at 3:07 pm #461389Thanks!
-
AuthorPosts
- The topic ‘Aspect ratio blog thumbnails’ is closed to new replies.