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

Black image after compression on iOS #190

Open
rafavalerio opened this issue May 1, 2023 · 1 comment
Open

Black image after compression on iOS #190

rafavalerio opened this issue May 1, 2023 · 1 comment

Comments

@rafavalerio
Copy link

rafavalerio commented May 1, 2023

Overview

I've seen mentions of this issue earlier and apparently, it has been fixed on v2.0.2.
But even after the update, I am still facing this issue on iOS (16.4.1, iPhone 12 and 13, Safari and Chrome) only (Android, or other desktop browsers are fine).

The issue happens when trying to perform a bulk image upload (Currently using AntDesign - Upload for that).

Single images or a smaller number (up to 10) works fine, but any higher than that will result in black images.

These are the compression options I am using at the moment:

{
  maxSizeMB: 1,
  maxWidthOrHeight: 1500,
  useWebWorker: false, // Tried with both true/false, but the issue persists
}

Can it be related to running the compression simultaneously? Any idea why it works on Android (even on older devices like Pixel 5), but fails on an iPhone 12?

@Donaldcwl
Copy link
Owner

@rafavalerio There is a limit on memory usage in browsers which may be the reason for the black image outputs you are experiencing. I suggest trying to run the compression process sequentially instead of in parallel to determine if the issue persists.

If it works fine, we may need to find a way to restrict concurrent compression in order to prevent this problem from occurring.

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

2 participants