Image Resizer (Server-Side)
Resize JPEG, PNG, WebP, AVIF, and HEIC on our EU servers with proper fit modes. Files auto-deleted after 15 minutes.
Reviewed by Aygul Dovletova · Last reviewed
How to Use the Server-Side Image Resizer
- Drop the source file into the upload area. JPEG, PNG, WebP, AVIF, HEIC, and HEIF are accepted; HEIC from an iPhone is fine even though browsers cannot show it directly.
- Pick the target dimensions. Set width, height, or both. The values are in pixels, capped at 8192 per axis. Leaving one empty keeps the aspect ratio automatically.
- Choose a fit mode: contain shrinks to fit inside the box and pads if the box is bigger, cover fills the entire box and crops what does not fit, fill stretches the source to the exact box without preserving aspect.
- Click Resize image. The file uploads in one request, libvips on the server reads the source, applies the resize, and pushes the result to a signed URL.
- Download the resized file. The signed URL is valid for 15 minutes; after that the source and the output are deleted from disk.
Why Resize on the Server Instead of in the Browser
The pure-browser Image Resizer is fine for typical screenshots and web photos, but it has hard limits that surprise users with iPhone HEIC files, professional camera RAWs (already converted), or high-resolution scans. The HTML Canvas backing store is capped at 268 megapixels (16,384 x 16,384) and most browsers fail well below that because the entire decoded raster has to fit in JavaScript memory. iPhone HEIC files cannot be decoded by Chrome or Firefox at all; Safari decodes them but cannot re-export to a portable format like JPEG from Canvas. Server-side resize using libvips (via the sharp Node binding) streams the source instead of holding the whole raster, scales down on the fly, and re-encodes to the original or to a web-friendly format without any browser memory pressure.
The Three Fit Modes Explained
"Resize to 1280x720" is ambiguous because a 4000x3000 photo and a 720x720 logo will fit a 1280x720 box very differently. The fit mode picks the rule. Contain is the safe default: the longest edge of the source is scaled down to match the box, the other edge ends up smaller than the box, and the empty space stays transparent for PNG and WebP or is padded with the background for JPEG. Cover reverses that logic: the shortest edge of the source is scaled to match the box, the other edge overflows, and the overflow is cropped centred. This is what you want for hero images and Open Graph cards. Fill is the rare correct choice when the source already has the right aspect and you just want to lock the pixel dimensions; for everything else fill produces stretched faces, distorted logos, and angry designers.
Common Resizing Scenarios
- Resizing a 24-megapixel mirrorless camera JPEG to 1920 wide for a blog post hero, cover mode if the image is taller than 16:9.
- Shrinking a batch of iPhone HEIC photos to 1080 wide for a private cloud gallery, contain mode preserving 4:3.
- Generating a 1200x630 Open Graph card from a portrait product shot, cover mode cropping centred so the product stays in the frame.
- Producing a 320x320 favicon-pack source from a 4000x4000 brand asset, fill mode because both source and target are square.
- Cutting a scanned manual page from 8000x10000 to 1500x1875 for a knowledge base, contain mode locked to 4:5.
- Right-sizing user avatar uploads to 256x256 before they hit the CDN, cover mode plus a sane max-upload guard.
What This Tool Preserves and What It Drops
Resize is a pixel operation, not a metadata operation, so the source's EXIF block, ICC colour profile, and XMP keywords are preserved unless you also run the EXIF Stripper. The output format stays the same as the input format (JPEG stays JPEG and so on), with one exception: HEIC and HEIF are transcoded to JPEG on the way out because most browsers cannot display HEIC directly and the resizer cannot offer something the user cannot see. If you want a different output format, run Image Format Converter after resizing, or jump straight to Image to AVIF for the modern web codec.
Privacy, Limits, and Performance
Files are processed on EU servers; both the upload and the resized output are deleted 15 minutes after they are created. Signed download URLs expire with the file. Inputs are limited to 100 MB and 8192 px per axis - large enough for camera JPEGs, scanned posters, and panoramas, small enough to keep the queue moving for everyone. Typical resize on a 12 MP photo takes under 800 ms once the upload completes; HEIC inputs are slower because the HEVC decode runs single-threaded inside libheif. There is no API key required for casual use; the rate limit kicks in only on heavy parallel use from one network.
Frequently Asked Questions
Why a server-side resizer when ZeroUtil already has a browser-only one?
The browser-only Image Resizer cannot decode HEIC or AVIF on most desktops and runs out of memory around 24 megapixels because the Canvas backing store is capped at 268 million pixels. The server-side resizer uses libvips through the <code>sharp</code> binding, which streams the file and decodes every format we accept without holding the entire raster in memory. Privacy is preserved by an aggressive 15-minute auto-delete on both the upload and the output.
What does each fit mode actually do?
<strong>Contain</strong> shrinks the image so it fits inside the target box without cropping, leaving transparent or padded space where the box is wider or taller than the image. <strong>Cover</strong> fills the box completely and crops the overflow, centred by default - the right choice for hero photos. <strong>Fill</strong> ignores the source aspect and stretches to the exact width and height, which can squash faces.
Does setting only width or only height keep the aspect ratio?
Yes. Leaving one dimension empty tells the resizer to compute the missing axis from the source aspect, regardless of the chosen fit mode. A 4000x3000 image with width 1280 and height blank becomes 1280x960. A 4000x3000 image with height 720 and width blank becomes 960x720.
Is there a maximum dimension for the output?
The form caps each axis at 8192 px. Larger values are rejected before the upload to keep the server from rendering posters that can OOM a browser anyway. For 16K poster work, run libvips locally with <code>vipsthumbnail --size=16384</code>.
What happens to colour profiles and EXIF?
Resize preserves the embedded ICC profile so a Display P3 photo stays Display P3 after resizing. EXIF is preserved by default to keep camera info and copyright on the output. To strip everything use the <a href="/tools/strip-exif/">EXIF Stripper</a> as a second step.
HEIC support - what is the catch?
Decoding HEIC requires patent-encumbered HEVC code. Our build uses the open-source <code>libheif</code> + <code>x265</code> stack, which is fine for personal and editorial use; commercial redistribution of HEIC output may require a separate licence. Output formats stay royalty-free: WebP, AVIF, PNG, JPEG.
Why is the output sometimes a slightly different format than the input?
Resize alone does not change the format - JPEG stays JPEG, PNG stays PNG. The exception is HEIC and HEIF: most browsers cannot display HEIC, so the response is automatically transcoded to JPEG. If you want a different output format explicitly, run <a href="/tools/image-format-converter/">Image Format Converter</a> or <a href="/tools/image-to-avif/">Image to AVIF</a> after resizing.
How long is the resized file kept on the server?
Both the uploaded source and the resized output are deleted 15 minutes after they were created. Downloads use a signed URL that expires when the file is removed. After deletion the API has no copy of either file - re-running the same input does not pull from cache, it re-decodes from scratch.
Can I resize multiple files in one go?
Not yet. The current form accepts one file per request. Batch resize is tracked separately; for now run the form once per file or use libvips on the command line: <code>for f in *.jpg; do vipsthumbnail $f --size=1280 -o "%s-1280.jpg"; done</code>.
More Image Tools
Base64 to Image Converter
Decode a Base64 string or data URL back into a viewable image and download it as PNG, JPG, WebP or GIF. Runs in your browser.
Open toolFavicon Generator
Generate favicons in all standard sizes (16x16 to 512x512) for websites and PWAs.
Open toolImage Blur & Pixelate
Apply blur or pixelation effects to images with adjustable intensity.
Open toolImage Color Picker
Upload an image and pick colors in HEX, RGB, and HSL with a visual color history.
Open toolImage Compressor
Compress images by adjusting quality to reduce file size without losing visual clarity.
Open toolImage Cropper
Crop images with preset aspect ratios like 1:1, 16:9, and 4:3 using a visual editor.
Open tool