Files
noteflow/src
Claude cc635f786f feat: add automatic image compression before upload
Added client-side image compression to improve upload speed and reduce storage.

New Features:
- Created imageCompression utility (src/utils/imageCompression.ts)
  * Automatically compresses images larger than 1MB
  * Resizes to max 1920x1080px while preserving aspect ratio
  * Uses 80% JPEG quality by default
  * Preserves PNG transparency when present
  * Falls back to 60% quality if still over 2MB

Mobile (NoteDetailPage.tsx):
- Integrated compression before upload
- Shows compression stats to user (e.g., "5.2 MB → 1.1 MB")
- Better error messages with specific details

Desktop (Index.tsx):
- Same compression integration as mobile
- Consistent user experience across platforms

Benefits:
✅ Users can upload large photos from cameras/phones
✅ Faster uploads (smaller files)
✅ Reduced server storage requirements
✅ Better mobile experience (photos often 5-10MB)
✅ Transparent to user (happens automatically)

Technical Details:
- Uses HTML5 Canvas API for processing
- Client-side compression (no server load)
- Maintains image quality while reducing size
- Handles JPEG, PNG, WebP, and GIF formats
- Smart transparency detection for PNGs
2025-11-27 13:14:37 +00:00
..
2025-11-06 12:20:20 +01:00
2025-11-06 12:20:20 +01:00
2025-11-06 12:20:20 +01:00
2025-11-06 16:10:48 +01:00
2025-11-06 12:20:20 +01:00