e14d559a13
Replace the hardcoded POST_IMG_MAX limits baked into the resize helpers with explicit per-caller maxDimension/maxBytes parameters. Pasted image URLs now pre-shrink at the high-res 4000px/2MB post limits instead of 2000px/1MB, removing a quality bottleneck before compressImage runs. Avatar/banner/onboarding and link thumbnails keep their 2000px/1MB limits. Also bring web doResize to parity with native by clamping dimensions via a shared getResizedDimensions (hoisted into media/util.ts), and shadow the mutated maxDimension param in compressImage as a local. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>