question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Safari for iOS: Scaled up image is blurry regardless of original image size

See original GitHub issue

Bug 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.

Link to the bug reproduction

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:open
  • Created 4 years ago
  • Reactions:10
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
moujikovcommented, Apr 9, 2020

.medium-zoom-image--opened { object-fit: contain; }

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?

0reactions
francoischalifourcommented, Jul 18, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found