spatie / statamic-responsive-images

Responsive images for Statamic 3
MIT License
99 stars 29 forks source link

Retina / pixel density #124

Closed stuartcusackie closed 2 years ago

stuartcusackie commented 2 years ago

What's the recommended approach to generating retina / high-density pixel images with this package? Ideally I would like a 2x version of each image in the srcsets with a flag so the browser can decide which one to use. I do this in my own custom glide implementation by using the glide parameter dpr=2.

The best I can manage with this package is either to generate images that are way too big for some devices, which throws up pagespeed warnings like 'Properly size images', or else I just have to set a much smaller max width and use images that look bad on high resolution devices.

stuartcusackie commented 2 years ago

Nevermind, just realised that large images work just the same as high pixel density images, i.e. a high-res screen will still have a sharp image by using one of the larger sizes. PageSpeed seems fine now.