Safari for iOS: Scaled up image is blurry regardless of original image size
See original GitHub issueBug description
When you scale up an image using medium-zoom, the resulting scaled image will be blurry.
How to reproduce
Please have a look at my comments (including various examples) on bugs.webkit.org.
Expected behavior
The resulting image should be sharp.
Reproducible example
To verify, open this example on https://3zive.csb.app/
using Safari for iOS. I’ve modified the library to use translate instead of translate3D as the latter already has problems with Safari on iOS (see the issue on webkit.org). Still, the zoomed image will not be sharp. Maybe there’s some kind of workaround using CSS attributes to get Safari to rerender the image after it has been zoomed.
Environment
- Browser: Safari (iOS 13.3.1)
medium-zoom
version: 1.0.5
As this problems occurs on Safari for iOS, all other browsers using WebKit on iOS (e.g. Firefox) should also be affected.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:7 (1 by maintainers)
Top Results From Across the Web
ImageRenderer on iOS - generates b… - Apple Developer
I'm getting a low quality image when using ImageRenderer on iOS16 both on simulator and device. i.e. when saving the rendered image to...
Read more >Scaled-down images are blurry in mobile safari (only on 1 page)
I can't figure out, what's blurring the images. The images' resolution is high enough, so it doesn't have anything to do with the...
Read more >Struggling with blurry website imagery? You're not alone ...
A website tainted with fuzzy and blurry images can affect engagement and lead to an overall negative experience for visitors.
Read more >Preventing Blurry Pictures: The Keys to Clear Images
Nothing is more frustrating than blurry pictures. While you can try tinkering in a photo editing program, the best strategy is to start...
Read more >Picture perfect images with the modern <img> element
Set dimensions (width, height) on your images; Use CSS aspect-ratio or aspect ratio boxes to reserve space otherwise. For low impact to First...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just given it a try: no changes for me, still blurry on iOS 13.3.1
Just a guess: Remote debugging may force Safari to re-render the image correctly. Were you remote debugging by any chance?
In theory, you could manipulate a CSS property that triggers a paint so that Safari “reflows” the screen. See Rendering Performance on web.dev.
There might be other ways of doing this. If someone wants to go ahead and send a PR, I’d happily review it.