The image in my media library is 560×315, but when I inspect the image this is the code I find. srcset
images are being loaded instead of my full resolution image.
<img src="https://domain.com/feat-image-150x84.png" class="alignleft post-image" alt="Return of Medicare OEP"
srcset="https://domain.com/feat-image-150x84.png 150w,
https://domain.com/feat-image-300x169.png 300w,
https://domain.com/feat-image.png 560w" sizes="(max-width: 150px) 100vw, 150px">
Despite their names (300x169.png) all of the srcset
images are only 150x84.
I've tried:
- Turning off any plugins that affect images
- Changing the image sizes in Settings > Media
- Regenerated every image a multiple times
- I tried adding
set_post_thumbnail_size(560, 315);
to my functions.php file as someone suggested. That did make the images display in the correct dimensions, but not the correct resolution.
I even removed the srcset
image links. I was hoping if I did than it would default to the full resolution.
function wdo_disable_srcset( $sources ) { return false; } add_filter( 'wp_calculate_image_srcset', 'wdo_disable_srcset' );
but that just made it worse.
How do I make WordPress use the full resolution image I uploaded?
return false;
}
add_filter( 'wp_calculate_image_srcset', 'wdo_disable_srcset' );```
but that just made it worse.
How do I make WordPress use the full resolution image I uploaded?