Photo processing was slow on most devices because blurhash was encoded
from the full-resolution image, the original file was decoded up to five
times, and the Android fallback path skipped native resizing.
- Encode blurhash from a <=64px canvas instead of full resolution
- Process main image, thumbnail and blurhash in a single worker pass,
decoding the original only once and deriving the thumbnail from the
resized main image
- Retry createImageBitmap via an in-memory Blob before falling back to
stepped software scaling, and validate the browser honored the resize
- Avoid the redundant full-resolution canvas and release intermediate
canvases during stepped scaling
- Swap the preview to the processed thumbnail and decode it async
- Lower main image JPEG quality to 0.85
Adds unit tests for the image-processor service and documents the design
in doc/dev/photo-upload-performance.md.