0

I have set crop in functions.php to resize Images for Posts.

Codex from Wordpress: add_image_size, post_thumbnail

  add_theme_support('post-thumbnails');
  set_post_thumbnail_size(100, 100, true); //size of thumbs
  add_image_size( 'post-thumb', 180, 180, true ); //(cropped)

Usage is like below

<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'post-thumb' ); } ?>

But it will not resize the thumb and shows the original size. What am I doing wrong?

2
  • did you upload the image before you added the new size? WP will not resize the images on-the-fly, you'll have to regenerate sizes that were added after upload.
    – Milo
    Commented Feb 5, 2013 at 18:34
  • It is taking on the fly with WPeMatico. Also tried with this link Commented Feb 5, 2013 at 18:41

1 Answer 1

1

After adding new image sizes, you might need to rebuild your thumbnails. I have used AJAX Thumbnail Rebuild after encountering a similar issue, and it worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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