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.

Please take a look at this cicada photo - http://photo.aseev.com/stock-photo/cicada-exuviae/ - below you will see 5 thumbnails, all of them are squared, except one (a bug on white background).

It is rectangular and it is actually the "medium" size (unlike 4 other thumbnails, which have correct paths to the "thumbnail" size image).

Removing the post and the image from media gallery and recreating the post doesn't help.

The thumbnail image for this file exists in the right directory and it is squared (*-150x150.jpg). In mySQL sizes are defined correctly for the thumbnail, from what I understood.

In media library, each photo has a thumbnail in front of its title, all of them squared except the one I have the problem with.

I upload images programmatically with wp_handle_upload, so maybe there was a mySQL input error.

Don't know where else to look. Anyone else experienced this? Is there a way I can fix it manually in the mySQL db?

share|improve this question
    
Can you show your code that outputs the thumbnails? –  vancoder Aug 19 '13 at 16:17
    
I output it with the_post_thumbnail( array(50,50) ); the_post_thumbnail('thumbnail'); displays the squared one. I can use that, but I'd like to find out what the problem is, since in the media library displays it incorrectly as well. –  Dima Aug 19 '13 at 16:26
    
Without seeing your code for setting up custom image sizes and/or for outputting the thumbnails, it's impossible to help. –  vancoder Aug 20 '13 at 5:09
    
I have no custom sizes specified in functions.php and I output images with the_post_thumbnail( array(50,50) ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { echo '<h3>Similar Images: </h3>'; echo '<div class="similar-images-box">'; while ($my_query->have_posts()) { $my_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Stock image: <?php the_title_attribute(); ?>"><?php the_post_thumbnail( array(50,50) ); ?></a> <?php } echo '</div>'; } wp_reset_query();</code> –  Dima Aug 22 '13 at 17:12
    
I don't think it is a problem of output. As I mentioned, in media library this particular file also has the wrong size thumbnail. The rest are squared. Take a look - mediafire.com/view/678s4bd8sylqziz/wp-thumb-size.png –  Dima Aug 23 '13 at 14:22

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.