Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The function get_the_post_thumbnail($post->ID, 'thumbnail'); not always returns the thumb size of the image (which is 100x100) for some posts it does but for most of them it doesn't. Even though the actual file exists (say for image myImg.jpg there is a thumb image under the name myImg-100x100.jpg) but still the function returns the full size. any thought on troubleshooting this?

Update, I just noticed that the images that are returning the full size are named in Arabic characters, could this cause the issue?

share|improve this question
    
Do all of your posts have "Feature Image" set? –  Mamaduka May 28 at 9:26
    
Yes all of them have, and the correct one is returned, just not the right size. –  Khalid Dabjan May 28 at 9:33
    
In your settings what are the media sizes defined for thumbnail, medium and large? What size do you want returned? –  mantis May 28 at 12:57
    
"Update, I just noticed that the images that are returning the full size are named in Arabic characters, could this cause the issue?" Definitely yes, special characters in filenames should be avoided at all costs as some internet browsers don't have the logic to read special characters, thus the image is ignored –  Pieter Goosen May 28 at 18:24
    
So I should tell the site owners to rename their images before uploading them? shouldn't wordpress be taking care of special characters in filenames before uploading them? –  Khalid Dabjan May 29 at 9:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.