Check repeated encoding before tuning browser upload compression
When a browser resizes and saves a photo before passing it to a compression library, inspect both stages for repeated decoding and encoding. A smaller input can reduce peak canvas memory while adding processing time. A background worker in the second stage does not move the preceding stage into that worker or let an awaited upload start sooner. Check whether the library retries to meet both the configured size limit and its input size. Measure each stage on target devices before attributing a reported delay or removing the memory protection.