I have a general problem with thumbnails in my theme.
I use a mix of horizontal and vertical featured images for my posts and in my old theme the thumbnails were simply cropped to the right proportions instead of distorted.
In the Sparkling theme, the thumbnails are distorted so that vertical images are pressed flat. How can I fix this?
Hi Movin
Sorry for my late reply, I got all caught up in Christmas
I should have clarified that I have already tried using the regenerate thumbnails plugin several times, with the same result. In Settings > Media, I have set the thumbnail size to 180 x 180 pixels and checked the “crop thumbnails” option, but as you can see, all thumbnail images are distorted.
Thanks for your tip!
I removed the code, which correctly ensures the thumbnails are not distorted BUT they are now their actual proportions, e.g. a mix of vertical and horizontal images. I need the thumbnails to be 140 x 140 pixels cropped. How can I achieve this?
What I want to do is force the thumbnail size to 180x180 pixels cropped instead of distorted.
As already mentioned, I have set “thumbnail size” to be 180x180 and cropped in the media section of Wordpress’ settings.
Thanks for the reply and the helpful tip. I changed the_post_thumbnail code as you suggested, which seems to have solved the problem for the vertical thumbnails. However, the horizontal thumbnails are not shown as 180x180.
Note: I ran the regenerate post thumbnails plugin after changing your code just to be sure, with no change.
Thanks so much, this did the trick! I changed the article.post img as you suggested and ran the regenerate thumbnails plugin. Now all my thumbnails look correct.
One last question related to this: Is it possible to set a different thumbnail size for mobile and desktop devices?