-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Today I learned why WordPress often doesn't output srcset images from its default methods. See this answer
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 1270x400.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels