the_post_thumbnail responsive srcset not populating with custom image size

There’s not enough info to be sure this answer is definitive but here’s an attempt.

Firstly make sure the image you are uploading is actually larger than the size you have defined. I see people upload images that are too small and then get this sort of result all the time.

Secondly, WP will only make up a Srcset list of image sizes with the same aspect ratio. If your custom size had a different aspect ratio to other image sizes then you can create a selection of new sizes with aspect ratios that match.

Thirdly, after changing or adding new image sizes you must always regenerate existing thumbnails. There’s a great plugin called Regenerate Thumbnails for this.

Leave a Comment