Archived topic
Comments Avatar Size change
6 replies · Started by Anton on March 8, 2019
Am I right in thinking that Avatar dimensions are dictated somewhere in the theme?
If so, is there an easy way to change the size displayed please?
Please note, if your answer includes anything like...'and add this function' You can take it as read that I will already be lost!
Thanks in advance
Hi there,
It does involve adding a function, but it's not too hard! :)
This is the function:
add_filter( 'generate_comment_avatar_size', function() {
return 100; // The size in pixels. This would be 100 x 100.
} );
The function can be added super easily using a function like this: https://wordpress.org/plugins/code-snippets/
Let me know if you need more info.
Thanks for the help Tom.
I added that via the code snippets plugin but the images are still tiny?
You can see an example here.
https://kingcannabidiol.co.uk/product/8-800mg-cbd-oil/#reviews
Hi there,
the display size is set by Woocommerce CSS, so you will need this:
.woocommerce #reviews #comments ol.commentlist li img.avatar {
width: 40px;
}
The avatar is absolutely positioned so making too big will mean it overlaps the content. Let us know.
Hi David. I wondered where you'd disappeared to! No more Flint Skin website?
Anyway, that worked perfectly and, given that it was a woocommerce setting rather than a GeneratePress setting, I'm grateful for the help. Above and beyond. Thank You.
You were right about the content overlap but set at 65px, it does what's required without issue.
Thanks again
Awesome :) it still out there somewhere. Some great guy called Tom invited me to help out here. Couldn't turn it down lol
Well you enjoy it. Thanks again.
Missing the CSS videos on YouTube though, got to be honest.
(great guy eh? Pay review time? ;))