Donaldcwl / browser-image-compression

Image compression in web browser
MIT License
1.27k stars 160 forks source link

Image Compression On Ipad Safari Browser Results In Black Image When Image Is Over 10MB #205

Open s3venvials opened 1 year ago

s3venvials commented 1 year ago

Hello, when using the latest version of your library 2.0.2 with in the Safari browser to compress an image the image displays as a black image on some versions of IOS when the image is over 10MB.

IOS Versions that display compressed image as black: 15.7.7 and 16.4.1 Both of these versions are from an IPad. Seems to work fine on the Iphone with IOS 16.5.1 (c)

Image used https://www.learningcontainer.com/wp-content/uploads/2020/07/Large-Sample-Image-download-for-Testing.jpg

How I have the options set

var imgOptions = {
    maxSizeMB: 10,
    maxWidthOrHeight: 1920,
    useWebWorker: true,
}
Donaldcwl commented 1 year ago

@s3venvials Can you please access the website https://on690.codesandbox.io/ using your iPad, click on the "test" button, and then share the results with me?

Pablito203 commented 8 months ago

hi, any solution for this issue?

Russell-Pollari commented 1 month ago

I have also come across this on an Ipad pro. I think the error is due to the Ipad's user agent string being identical to a mac's see: #222