I am using twenty fourteen theme to make another theme most of the files are same including the functions.php file, but the problem I am having is , When I add image size ( with true crop, hard crop mode). The images are not getting cropped on the front-end, only getting resized, but I want them to get cropped also. I will appreciate any help.

  • is image getting resized proper? means of proper size you mentioned? If its resizing to the size you mentioned than its correct. If its resizing in proportion than there is some issue – shahpranaf Jan 6 '14 at 12:48
  • It is resizing to the size I give, e.g:- if I give 335x355. an image originally of any larger size will resize to the given width, height respectively, but if the image is originally less than the given size in height or width then only the dimension (width or height) that's large in size gets resized. No cropping is done in any way. – Omair Jan 6 '14 at 13:13

wordpress by default do not resize/create/crop image for small images. It will show original image instead.
For eg. required is 335x355. You uploaded image size 25x25 then it will not create image of 335x355 size. It will show full image i.e original image instead when you call 335x355 size image

| improve this answer | |
  • No, I just gave an example , for the bigger images it is also not cropping the image – Omair Jan 6 '14 at 14:18
  • add "add_theme_support( 'post-thumbnails' );" in your function.php – shahpranaf Jan 6 '14 at 14:55

If your images were uploaded before adding the new image size, you might need to purge the thumbnail cache. I found that Force Regenerate Thumbnails works really well to clear the image cache and regenerate images in the new sizes and crops/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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