Resize an image to an exact width, height, or percentage
The resize image tool scales a PNG, JPG, WebP, AVIF, HEIC, or GIF to the size you ask for and keeps the aspect ratio locked. You set one dimension and the tool computes the other, so nothing is stretched or squashed. The work happens in the browser, and the image is never uploaded.
The three modes
The mode option decides what the value means. It defaults to width, with a value of 1280.
Width mode sets the output width in pixels and computes the height. 1280 fits most article layouts and chat windows. Use 1920 for a full-width hero image and 800 for an email.
Height mode sets the height and computes the width. Pick it when images of different proportions need to line up in a row, such as a strip of thumbnails that must all be 300 pixels tall.
Percent mode scales both dimensions by the value. 50 halves each side, which cuts the pixel count to a quarter. It is the easiest way to shrink a batch of photos of mixed sizes by the same amount.
The value accepts whole numbers from 1 to 20000.
Upscaling is off by default
The tool refuses to make an image larger unless you ask it to. If the input is 1000 pixels wide and you ask for 1280, the output stays at 1000. Enlarging a photo never adds detail; it spreads the existing pixels over more area and makes them look soft. Leaving upscaling off means you can drop a mixed batch with a width of 1280 and know that only the oversized files change.
Turn on allow upscale when you have a reason, such as a platform that rejects images below a minimum size, or a small logo that has to fill a fixed box.
Formats and output names
The output keeps the input format, except HEIC. Browsers can decode HEIC through libheif but cannot encode it, so a resized HEIC comes out as JPG.
The output file is named after the input with the final width added, so "photo.jpg" at 1280 wide becomes "photo-1280w.jpg". Resize the same file at several widths and the names will not collide, which helps when building a set of sizes for a responsive page.
JPG output is encoded with mozjpeg, PNG with oxipng, WebP with libwebp, and AVIF with the AV1 encoder, all compiled to WebAssembly.
When to combine with other tools
Resizing has the biggest effect on file size, because halving the width removes three quarters of the pixels. Even so, the encoder writes the result at a fixed quality. If the resized file is still too large, run it through compress image and pick a lower quality number.
If the destination also wants a different format, convert image handles that step. Resize first, then convert, so the encoder works on the final pixel count.
To lay out the resized images as pages of one document, use images to PDF. Shrinking photos to around 1600 pixels on the long side before combining them keeps the PDF readable without making it huge.
Frequently asked questions
Will resizing stretch my image?
No. You set one dimension and the tool computes the other from the original aspect ratio, so proportions never change.
Why did my image not get bigger?
Upscaling is off by default. The tool refuses to make an image larger than its source unless you turn on allow upscale.
What is the difference between width, height, and percent?
Width sets the output width in pixels, height sets the output height, and percent scales both sides by the same factor. Only one applies at a time.
Does the format change?
No, except for HEIC, which comes out as JPG because browsers cannot encode HEIC.
What width should I use for the web?
1280, the default, suits most article layouts. Use 1920 for a full-width banner and around 800 for an email.
What is the output file called?
The input name with the final width added, so 'photo.jpg' resized to 1280 wide becomes 'photo-1280w.jpg'.