In functions.php, I have:
add_image_size( 'coach-profile-pic', 88, 113, true);
In my template, I have:
$pic = wp_get_attachment_image_src( $picture['profile_pic'][0], 'coach-profile-pic' );
For some images, they’re being returned in full size while others are being returned as 88×113 (as expected). All of the images were uploaded after the custom image size was added to functions.php For the images that are being returned as full size, I’ve checked and the 88×113 size of that image exists on the server. I can’t figure out why full size images are being returned rather than the custom image size. Thanks in advance!
I believe the problem is that some of the pictures do NOT have proper sizes to return. You have to check if you generate proper size photos when you add them to db.
Normally when I import files into wp I do something like:
Of course it’s only sample, and you have to adapt it into your script and generate proper size of image. Good luck!