Open filipevserra opened 9 months ago
Very interesting issue
There are some regex in the code
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
const isIOS = /iPad|iPhone|iPod/i.test(navigator.userAgent);
For now the only solution for you is to only use the compress function, and do the upload on your side.
I will investigate because it's interesting, but it is in low priority for now.
Uploading a huge image to the demo site (https://image-library.app/) in the "Upload and Compress Image", it'll take a long time to finish if some extensions or libs change the prototype of RegExp. Reducing the steps to the minimum to reproduce the problem, I have:
globalThis.Object["defineProperty"](globalThis.RegExp.prototype, 'mynewproperty', {});
Thirdy party products to protect JS code can causes this changes on RegExp.
The problem occurs only on Chrome and Edge. Firefox works fine.