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– shahpranafJan 6, 2014 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.– OmairJan 6, 2014 at 13:13
2 Answers
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
-
No, I just gave an example , for the bigger images it is also not cropping the image– OmairJan 6, 2014 at 14:18
-
add "add_theme_support( 'post-thumbnails' );" in your function.php Jan 6, 2014 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/