Add additional default image sizes for srcset to accommodate wider viewports #11821
Labels
[Feature] Media
Anything that impacts the experience of managing media
[Type] Enhancement
A suggestion for improvement.
Related to #6177 and #6131. Filed as separate issue because #6177 is getting too big.
Problem
Images aligned to
wide
will need proper size options from thesrcset
attribute. Currently the sizes generated for a large image (eg 4000px wide) are:These sizes should be closely tied to real-world data about viewport widths. Currently the only readily available data is screen sizes. One source is StatCounter's worldwide screen resolution stats. They break down as follows (October 2018):
Proposal
Align automatically generated image sizes to browser stats taking into account 2x and 3x displays.
Proposed new sizing array:
This might seem like a lot, but for most images only the smaller sizes will be generated. For larger images, providing these additional sizes available for the
srcset
attribute will ensure the browser pulls down the smallest possible image forwide
images displayed in wider viewports.Note
This permanently disassociates the physical image sizes from the classic display widths defined by WordPress. Which makes sense because the old modality of pixel widths defining small/medium/large image sizes no longer applies anyway.
The text was updated successfully, but these errors were encountered: