No srcset for hard-cropped thumbnails

To show a srcset, there must be multiple image sizes of the same aspect ratio. When you set your thumbnail to hard crop without creating any other image sizes you are ensuring that there won’t be a srcset.

You might find my answer here helpful.

Briefly, in your case, adding this line:

add_image_size ( 'double-size', 1270, 400, true );

… will make a srcset with both the cropped sizes when you upload a fresh image larger than 1270×400.

Leave a Comment