Donaldcwl / browser-image-compression

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

Error when using big files on Safari #163

Open vsachini opened 2 years ago

vsachini commented 2 years ago

Expected Behavior

Compress image;

Current Behavior

When compressing I get an error "Not allowed to load local resource" only when the image is big. Using the same image but cropping it smaller, the compression works fine. I've tried with useWebWorker true and false and got the same results.

It works fine on Chrome and Firefox.

image
Donaldcwl commented 2 years ago

@vsachini Would you mind uploading your large image for us to debug? Thanks.

vsachini commented 2 years ago

Hi @Donaldcwl,

Here's the link to the image I was using: https://unsplash.com/photos/dFmNTi27QLQ/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8MTZ8fGdvbGQlMjBjb2FzdHxlbnwwfHx8fDE2NjU0NTM0Njg&force=true

Donaldcwl commented 2 years ago

Hi @Donaldcwl,

Here's the link to the image I was using: https://unsplash.com/photos/dFmNTi27QLQ/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8MTZ8fGdvbGQlMjBjb2FzdHxlbnwwfHx8fDE2NjU0NTM0Njg&force=true

This image is a 3.8MB jpg file. It works fine on Macbook Safari 16.0 (17614.1.25.9.10, 17614): 0A0B84B1-C703-4965-87BD-C600CF11864C

Did you upload the wrong image file?

sayhicoelho commented 1 year ago

Here is working fine with a 30MB image.