Image resize
MDV ToolsDrop an image, give it a width, download the re-encoded file. The aspect ratio is kept.
Output up to 12,000 px on either side and 124,992,400 pixels in all. iPhones and iPads stop at 16,777,216.
Set a width to encode.
How this works
The image is decoded by the browser, drawn once into a <canvas> at the
target size with imageSmoothingQuality = "high", then read back with
canvas.toBlob(type, quality). Height is round(width × h / w).
JPEG has no transparency, so for JPEG the canvas is filled with white first: transparent
pixels come out white, not black.
Re-encoding is lossy for JPEG and WebP: the pixels are not the original pixels, and running the tool twice compounds that. PNG ignores the quality slider. A browser that cannot encode the format you picked hands back PNG instead (Safari has long had no WebP encoder); the tool reads the type of what came back, says so, and sizes and names the download by it. The browser applies the EXIF orientation as it decodes, so the pixels come out upright; the orientation tag itself is dropped with every other non-pixel chunk — the rest of EXIF, the ICC profile, animation frames after the first — which is often the point but is never a secret. Enlarging past the source adds no detail, so it is off by default; a wider target is then held at the source width, and the output panel says so.
Limits: the file up to 100 MiB and 100,000,000 decoded pixels; the output up to 12,000 px on either side and 124,992,400 pixels in all (11,180 × 11,180), the largest canvas Firefox will draw — Chrome and desktop Safari go further. Above them the tool encodes nothing and prints the numbers, with the widest width the image allows. iPhones and iPads stop much lower, at 16,777,216 pixels (4096 × 4096); there, and on any device short of memory, the browser returns no image and the tool says so: a smaller width helps, another format does not.
The Dark button remembers its setting in this browser's local storage. Nothing you type or drop into the page is stored.