
jpeg:size is a decoding size hint, not the final thumbnail-size instruction. ImageMagick documents it for efficiently downscaling large JPEGs during reading. Put it before the JPEG input, then use a separate resize operation when the delivery needs an explicit output geometry.
Separate input work from output requirements
Write the target thumbnail dimensions and aspect-ratio policy before choosing a decoder hint. “Fit inside a rectangle,” “fill and crop,” and “stretch to exact dimensions” are different requirements.
The hint concerns the representation read from a JPEG. A later resize concerns the currently loaded pixels. A matching-looking filename or a requested hint does not prove the final dimensions.
Supply the hint before the read
A proposed POSIX-shell example is:
magick -define jpeg:size=1600x1600 input.jpg -resize 400x400 thumbnail.png
These values are illustrative and the command has not been executed. The plain resize geometry requests fitting within that bound while preserving aspect ratio; it is not a promise of a square 400-by-400 output for every source.
The official define reference identifies jpeg:size as a hint. Do not promise that every JPEG decoder produces precisely the hinted dimensions or claim a measured memory reduction without observing the installed ImageMagick 7 build and actual input.
Leave enough decoded detail for the task
A thumbnail workflow can tolerate a different working resolution from a detail-inspection workflow. Do not choose an aggressively small hint when another stage needs fine lettering or a larger final crop.
If the task requires the full source detail, compare against a normal full-read route before adopting the hint. A later enlargement cannot establish that discarded decoding detail was preserved.
The final-resize sharpening guide addresses another downstream decision after output geometry is chosen.
Inspect the actual derivative
Read the output dimensions and check a recognizable fine feature at its intended viewing size. Confirm which crop or aspect-ratio policy was actually applied. Keep the source and the complete command record with the thumbnail.
For an upload-byte limit, use the file-size guide separately. A decoding hint does not impose a final encoded file-size cap.
Accept the route only when it supplies the required derivative and adequate visible detail for its purpose. This guide reports neither a conversion nor a speed/quality benchmark.
Related tasks
- How Can I Reduce an Image Upload Size Without Shrinking Its Dimensions?
- Should I Sharpen an AI Image Before or After Making the Final Small Export?
Sources and scope
- ImageMagick official mechanism reference: jpeg:size supplies a geometry hint for efficiently downscaling large JPEGs during reading; decoder definitions and subsequent output transformations have different stages.
- ImageMagick define decoder scope: Defines configure coders when reading/writing; input decoder settings must be in effect for the read.
Official ImageMagick references were captured October 23, 2026. Morphology usage includes historical and experimental notes, which do not establish current-build regressions or guarantees. Examples and acceptance checks are proposed, not executed; confirm installed-build support, pixel representation and shell syntax.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Paparazzi Ratzfatzzi / Pexels, Pexels License. This is an illustrative source photograph, not an application screenshot or a generated test result.