Open adamjohnson opened 4 years ago
Sounds like a can of worms. More discussion would be needed to determine exactly how and when something like this could be applied.
What are some of your questions?
Reread it and it doesn't seem so bad now. So we'd always just be doubling the height and width of the image?
Yes*
*
As long as the dimensions of the original image can be doubled. Aka, if you insert a 300x300 image onto the page, then 2x would be 600x600 BUT the original image has to be 600x600 or larger.
If the image dimensions cannot be doubled, do no fancy srcset
ing.
Any news on whether this is doable? I would love to see this happen!
Many laptops and screens these days have pixel display densities greater than one. For example, a Macbook Pro's retina display has a display density of around 2.2x. My personal Dell XPS 13 has a display density of somewhere between 1.6x-3.3x.
When viewing images inserted via Mercury in CleanSlate on a display with a pixel density greater than 1, images look blurry.
Steps to reproduce the issue
Results
On a phone or Macbook Pro (etc), the images look blurry.
On a display with a pixel density of 1, the images look sharp.
Expected results
Images should look sharp on all devices and displays.
How do we do this?
Via the
srcset
attribute on the HTML<img>
tag. Here's what it looks like:Here's a real world example of what it would look like in CleanSlate:
If you wanted to support
3x
or1.5x
(etc) in addition to2x
, that's totally possible.Thoughts on Requirements
What happens if the source image can't be output at
2x
?Do nothing OR scale it to it's largest possible size. Not sure if you'd want to change
2x
to something else here.Where would this feature request take effect?
Anywhere images are inserted via the Insert Media Modal in Mercury.
Questions
Should we use
1.5x
instead of2x
?Some research would need to be done here.
So, @nreckart what do you think?