Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I get the image through wordpress built in post_thumbnail, but i see a lot of developers use timthumb for that and i don't know why! is it more flexible or something?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

There are two reasons:

  1. post_thumbnail was introduced with WordPress 2.9, and many themes which used TimThumb because post_thumbnail wasn't yet available to them.
  2. TimThumb is more flexible than post_thumbnail — it gives you more options for how images are cropped, and allows for simple filters to be applied to the images.

However, TimThumb has also caused security issues, especially with sites which didn't keep their themes (and because of this their timthumb versions) up to date. Because of this, it often makes more sense to use post-thumbnail, especially if you don't need much beyond WordPress' built-in cropping for thumbnails.

share|improve this answer
    
Thanks that was helpful –  Rahman Sharif Feb 2 '13 at 15:13
    
I have a question: post_thumbnail doesn't work with already existed images, so i have to tell the user to setup the regenerate thumbnail plugin to regenerate the thumbnails, do i have to do that with timthumb too? does it work with already existed images? –  Rahman Sharif Feb 2 '13 at 15:20
1  
@Elshereef & Gavin, see kaiser and Otto solutions to deal with Dynamic Images. –  brasofilo Feb 2 '13 at 17:37
add comment

Yes, it is more flexible. It allows you to resize or crop image in way you want ( check it's parameter listing: http://www.binarymoon.co.uk/2012/02/complete-timthumb-parameters-guide/ ). And have a look at project's homepage also: http://www.binarymoon.co.uk/projects/timthumb/

On the other side, if you do not need to use advanced image manipulation's, WordPress feature image (post_thumbnail) is OK. I, personally, have never uset timthumb in my themes and they all are working good. Especially when you can add_image_size

share|improve this answer
    
Thanks a lot it seems that post_thumbnail is enough for me, Thanks again for your help. –  Rahman Sharif Feb 2 '13 at 15:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.