Have to re-upload images to update new post_thumbnail sizes??
-
I’ve set up post thumbnails in my functions.php file like so:
// post thumbnails add_theme_support('post-thumbnails'); set_post_thumbnail_size(50, 50, true); add_image_size('info', 160, 9999); add_image_size('img-post', 575, 600); add_image_size('img-work', 900, 595);
I then call them on my templates like this:
<?php query_posts('post_type=work-architecture&posts_per_page=-1'); ?> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php the_post_thumbnail('img-work'); ?> <?php endwhile; ?> <?php endif; ?> <?php wp_reset_query(); ?>
Originally I had the boolean ‘crop’ parameter set to ‘true’ on ‘img-work’, so all of those images were being cropped.
I have since removed this parameter as I do not wish for the images to be cropped, but this does not update when viewing my website through the front end.
It seems that the only way I can update the images is by removing them from the media library and re-uploading them.
What’s most confusing is how the images in the media library are not cropped, so I cannot possibly think of why they are showing up as cropped on the frontend??
Do I somehow need to clear the cache in WordPress?
Matt.
- The topic ‘Have to re-upload images to update new post_thumbnail sizes??’ is closed to new replies.