Thumbnail image output at wrong size
-
Hi guys,
I’m sure I’m doing something wrong, but I haven’t come across this issue in the past and couldn’t find a solution through searching –
I’m using the post thumbnail to output one image on single pages. I’m asking it to display the full image but it’s outputting a reduced-quality image and, looking at the source, is outputting a srcset of images – not something I intended to happen.
My code is:
<a href="<?php echo get_permalink( $prev_post->ID ); ?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'full' ); } ?></a>
and that outputs:
<a href="https://mikechalmers.co.uk/gemma-ossen-2017/"><img width="1200" height="960" src="https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?fit=1200%2C960" class="attachment-full size-full wp-post-image" alt="" srcset="https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?w=1200 1200w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=150%2C120 150w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=300%2C240 300w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=1024%2C819 1024w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=100%2C80 100w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=250%2C200 250w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=550%2C440 550w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=800%2C640 800w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=225%2C180 225w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=375%2C300 375w, https://i2.wp.com/mikechalmers.co.uk/wp-content/uploads/2017/02/170213_Avalon028_08.jpg?resize=625%2C500 625w" sizes="(max-width: 1200px) 100vw, 1200px" /></a>
Whereas I just want it to output the full version of the uploaded image.
Thanks in advance for any assistance.
Mike
- The topic ‘Thumbnail image output at wrong size’ is closed to new replies.