Skip to content
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

[iOS Safari] White Picture if the file size is over 30 MB #116

Closed
Frans-L opened this issue Aug 25, 2021 · 2 comments
Closed

[iOS Safari] White Picture if the file size is over 30 MB #116

Frans-L opened this issue Aug 25, 2021 · 2 comments

Comments

@Frans-L
Copy link

Frans-L commented Aug 25, 2021

Problem

Uploading pictures over 30 MB will lead to a full white picture with iPhone 12 Safari.

image

Demo

The test PNG image can be downloaded from here. The result can be tested in the demo site.

The issue probably exists in all iOS devices. Safari in macOS works.

Possible Reason

The issue might be related that iOS Safari may not handle properly images/videos over 30 MB. I couldn't find any proper source for this except this release note bullet point:

image

Expected Behaviour

The image should be resized normally. If the problem cannot be fixed because of technical limitations, the function should throw an error.

@Frans-L Frans-L changed the title [iOS Safari] White Picture after if the file size is over 30 MB [iOS Safari] White Picture if the file size is over 30 MB Aug 25, 2021
@marthee
Copy link

marthee commented Sep 15, 2021

I'm experiencing the same issue with version 1.0.15. imageCompression seemingly succeeds, but the image result is all black and I see this warning in the browser (iOS Safari):

Canvas area exceeds the maximum limit (width * height > 16777216).

I read this [https://github.com/Donaldcwl/browser-image-compression#caveat] part of the documentation as it should be handled. And if not possible, I agree it should throw an error.

@Donaldcwl Donaldcwl mentioned this issue Sep 26, 2021
@Donaldcwl
Copy link
Owner

This issue is fixed in version 1.0.16.
Thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants