Closed Frans-L closed 3 years ago
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.
This issue is fixed in version 1.0.16. Thanks for your contributions.
Problem
Uploading pictures over 30 MB will lead to a full white picture with iPhone 12 Safari.
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:
Expected Behaviour
The image should be resized normally. If the problem cannot be fixed because of technical limitations, the function should throw an error.