rpophessagr
Member
Posted 2 years ago #
Hi I'm trying to incorporate the custom thumbnail sizes into my theme but I can't seem to get the crop feature to work.
Am I doing this wrong?
add_image_size( 'featured', 200, 225, true );
I thought that the 'true' at the end is supposed to tell the function to crop the image and it's not.
Thanks in advance!
I'm pretty sure the WordPress cropping feature requires the php-gd library to be installed on the server. I had the same problem locally, but after installing the php-gd library the problem disappeared.
Please note: This will not crop images that were uploaded before php-gd was installed. You will need to either manually upload the images again, or use the Regenerate Thumbnails plugin.
Ventureweb
Member
Posted 1 year ago #
What version of WP are you using rpophessagr? I found that anything within 3.0+ doesn't crop using the add_image_size( 'featured', 200, 225, true ); statement. It's almost as if it is being called to late??
Instead you can head to the Settings>Media area and adjust the thumbnail dimensions within there. Then upload an image to your post and you will see your specified dimension on the 'thumbnail' radio button.
Good luck. I wish someone had posted this when I was trying to work it out. But now I am attempting to help others. Hope this works for you.
Even relying only on Settings > Media I can't obtain what I want (images cropped to a fixed dimension). I've been stuck for two days and I'm starting to suspect the existence of a bug.