I’ve been trying to generate square thumbnails (let’s say 180px by 180px) with it for the past few days, and all I get is browser-resized, same ratio thumbnail (180px by 112px in my case). It does not do any back-end cropping or anything! I’ve been accomplishing perfect (and easy) thumbnails with a TimThumb script, but I figured since there’s an official option for a thumbnail now, I should provide support for it in my theme. No such luck. It is either the dumbest thing ever, or I am missing something.
Here is my code:
if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
}
set_post_thumbnail_size(180, 180, true);
What I am getting from my 500px by 333px image that I uploaded to Wordpress is 180px by 119px browser-resized image (so if I click View Image, it will show the huge 500px by 333px image). Could someone please tell me what I am doing wrong?
Also, removing ‘true’ from set_post_thumbnail_size does absolutely nothing, even though it should switch from ‘zoom’ resizing to ‘crop’ resizing.
Thanks!
Try this article:
http://www.kremalicious.com/2009/12/wordpress-post-thumbnails/
Also take a look at this one: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/
I’ve read it and now I have no problems working with thumbnails.
You have to regenerate all the thumbnails again. Anything that was already uploaded prior to the new post thumbnail functionality has to be regenerated.
Add the “Regenerate Thumbnails” plugin and run that. That will take all pre-existing images, and will generate the new images sizes.
I looked through every article about it already and none of them are helping. I also installed the plugin from that article but it had no effect on my problem. Not only does it not crop to the exact dimensions like it should but it does not resize the image at all, it just sets a smaller size to be displayed in the browser.
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Referred between 1 and 9 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 5 000 and 10 000 dollars
- Uruguay
something on your php.ini or on the chmod folders…. i´m sure. the most probable the plugin cant write the image…. look around that.
I looked through every article about it already and none of them are helping. I also installed the plugin from that article but it had no effect on my problem. Not only does it not crop to the exact dimensions like it should but it does not resize the image at all, it just sets a smaller size to be displayed in the browser.
Did you run the plugin, or just install it? You have to run it under tools for it to work.
- Bought between 1 and 9 items
- Bulgaria
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 1 and 9 users
- Sold between 5 000 and 10 000 dollars
I’m still not familiar with WP, but… is this what you’re maybe looking for?
