0

Following this guide, I want to add an additional image size:

if ( function_exists( 'add_theme_support' ) ) { 
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 150, 150, true ); // default Post Thumbnail dimensions (cropped)

    // additional image sizes
    // delete the next line if you do not need additional image sizes
    add_image_size( 'category-thumb', 500, 500 );
}

But I don't see this size (500 X 500) of image is created in /wp-content/uploads/... after uploading new images.

Any ideas what I have missed?

Run
  • 54,938
  • 169
  • 450
  • 748

3 Answers3

4

this works only for new uploaded images! just delete the old ones and upload them again.

Reflection
  • 399
  • 2
  • 11
0

Just add this code.

if (function_exists('add_image_size')){
add_image_size( 'category-thumb',500,500, true);

}
Hamid
  • 118
  • 1
  • 9
  • 2
    This may well have fixed the issue for the OP. However, you've provided no explanation as to why your code should work and why the OPs code didn't... – Mat Sep 17 '18 at 13:04
0

make sure that gd2 extension is enabled

Mahen
  • 760
  • 9
  • 12