-
Notifications
You must be signed in to change notification settings - Fork 165
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
Safari for iOS: Scaled up image is blurry regardless of original image size #151
Comments
An iOS Safari issue discussed here seems to be related: https://stackoverflow.com/questions/57952702/image-is-blurry-when-upscaling-in-mobile-safari |
In my situation the following helped fix that:
|
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? |
No I wasn't remote debugging in Safari. My blurriness might have been caused by #143. |
Just a quick heads-up: there's a simple script which basically does the same as medium-zoom. Despite having fewer options it also doesn't exhibit the problem described above. You can find it here: https://github.com/spinningarrow/zoom-vanilla.js I have yet to find the difference which results in non-blurred scaled up images, but for now I'm fine with the solution. |
Is there a fix or workaround for this? Really love this library and I need one that can zoom programatically and not using |
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. |
@tobiaseichert Your workaround worked for me thanks for sharing 🥳 |
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
medium-zoom
version: 1.0.5As this problems occurs on Safari for iOS, all other browsers using WebKit on iOS (e.g. Firefox) should also be affected.
The text was updated successfully, but these errors were encountered: