Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider limiting DPR to 2 or 3 #9

Open
dawaltconley opened this issue Mar 17, 2024 · 0 comments
Open

Consider limiting DPR to 2 or 3 #9

dawaltconley opened this issue Mar 17, 2024 · 0 comments

Comments

@dawaltconley
Copy link
Owner

dawaltconley commented Mar 17, 2024

According to this study, most users will not benefit from images with a DPR > 2. And pretty much zero users will benefit from a DPR > 3. This suggests:

  • At a minimum it is probably safe to remove any devices with dppx > 3 from the default devices list.
  • It may also be a good idea to remove any devices with dppx > 2.

Though as the study mentions, a dppx 2 image served on a dppx 3 screen might still be visibly reduced if the user is closer than an arm's length to the device. Worth weighing this concern against the bandwidth that would be saved sending dppx 3 images to mobile users on a slow connection... But in theory, it's the browser's job to make this calculation, and they will as long as a lower dppx is available. So the main benefit of limiting to 2dppx is reducing 1) build time, 2) size of generated images, 3) size of generated markup / css.

Since scalingFactor already optimizes the size of generated assets, it won't do too much there. But could make it much easier to optimize generated media-queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant