admin管理员组

文章数量:1317906

This is a weird situation. I have defined

 add_theme_support('post-thumbnails');
 add_image_size('190x280',190 , 280,true);
 add_image_size('400x600',400 , 600,true);

Uploaded images to post as featured image, on the server side I see the resized images in the uploads folder. In the template, I use code like this

<?php query_posts( 'post_type=hints&posts_per_page=1'); ?>
    <?php  if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div class="posrelative center-block ">
        <a class="colblack" title="<?php the_title_attribute(); ?>" href="<?php the_permalink();?>">
        <?php the_post_thumbnail('190x280', array('class' => 'img-responsive')); ?>
        <span class="textonpicleft two-lines"><?php echo get_the_title(); ?></span>
        </a>
    </div>

But, the function the_post_thumbnail returns only full sized image!

What the $#ck can it be? Because it is really annoying and I can not debug it? And this code I am using on other sites as well and everything works.

Do you know, how to debug it?

This is a weird situation. I have defined

 add_theme_support('post-thumbnails');
 add_image_size('190x280',190 , 280,true);
 add_image_size('400x600',400 , 600,true);

Uploaded images to post as featured image, on the server side I see the resized images in the uploads folder. In the template, I use code like this

<?php query_posts( 'post_type=hints&posts_per_page=1'); ?>
    <?php  if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div class="posrelative center-block ">
        <a class="colblack" title="<?php the_title_attribute(); ?>" href="<?php the_permalink();?>">
        <?php the_post_thumbnail('190x280', array('class' => 'img-responsive')); ?>
        <span class="textonpicleft two-lines"><?php echo get_the_title(); ?></span>
        </a>
    </div>

But, the function the_post_thumbnail returns only full sized image!

What the $#ck can it be? Because it is really annoying and I can not debug it? And this code I am using on other sites as well and everything works.

Do you know, how to debug it?

Share Improve this question asked Mar 26, 2014 at 18:45 jamjam 1732 gold badges3 silver badges15 bronze badges 2
  • I assume you have tested with all plugins disabled? – s_ha_dum Commented Mar 26, 2014 at 19:05
  • Yes. No change. – jam Commented Mar 26, 2014 at 19:08
Add a comment  | 

1 Answer 1

Reset to default 1

It is wery important, that your upload folder and subolders and images has the right permissions for webserver. If not, if you run Thumbnail regenerator plugin, something brakes and the_post_thumbnail failing to run correctly!

本文标签: thumbnailsthepostthumbnail returns full sized imagehow to debug