# Image Resizer

> Resize an image by pixels, percent, print size or into a box, crop it to a 1200x630 Open Graph card, and resize a batch the same way.

- Page: https://codethatmoves.com/tools/images/image-resizer/
- Site: Code That Moves
- Category: Images and files
- Free, runs in the browser, nothing is uploaded (files you drop in stay on your device)
- Last checked: 2026-11-03

## What it does

- Social card presets: Open Graph 1200 by 630, X large card 1200 by 600 (2:1) and LinkedIn 1200 by 627
- Crops to the card with a focal point you click, drag or set with sliders, so faces and text stay in frame
- Checks the file size against Meta's 8 MB limit and our own under 300 KB recommendation
- Paste a screenshot or copied image with Ctrl+V (Cmd+V on a Mac) instead of saving it first
- Resizes by exact pixels, by percent, or to fit inside a maximum width and height
- Print sizes in mm, cm or inches at a DPI you set (300 by default), with the DPI written into the JPG or PNG
- Resize more images with the same settings and download them as one ZIP
- The settings stay in the page link, so a size can be shared or bookmarked
- PNG and WebP keep a transparent background, or fill it with a colour you choose
- Keeps the aspect ratio, or fits, fills with a crop, or stretches to a new shape
- Common sizes such as 1920 by 1080, 1200 by 630 and 1080 by 1350 in one click
- JPG, PNG or WebP output with a quality slider

## How to use it

1. Drop the image, then choose how to resize: a social card, by size, by percent or into a box.
2. Set the numbers or pick a common size. With the ratio locked, changing one side sets the other.
3. Check the preview and the size, pick the format and download. To treat more images the same way, choose Resize more images the same way and get a ZIP.

## What it checks and why

Resizing is simple until the shape changes. With the ratio locked, the other side follows, so nothing is distorted. Without the lock you choose what happens when the new shape differs: Fit keeps the whole picture with empty margins, Fill covers the new size and crops the overflow, and Stretch squeezes the picture to the size.

Social card is an open graph image resizer. Pick Open Graph (1200 by 630, the size Meta recommends), X large card (X asks for a 2:1 ratio, so 1200 by 600) or LinkedIn (1200 by 627). The picture fills the card and the overflow is cropped; click the spot that matters and the crop moves to keep it in frame. The result shows the file size: Meta rejects images over 8 MB, and as our own rule of thumb, not a platform rule, a card under about 300 KB loads fast everywhere. Link here with ?preset=og, ?preset=x or ?preset=linkedin to open a preset directly.

Fit in a box is for the common job of keeping an image within a limit, such as 1280 by 720. It scales the picture down to fit and never enlarges it, because enlarging only makes it soft. The tool tells you when a size is larger than the original.

For print, switch the unit to mm, cm or inches and set the DPI: 35 by 45 mm at 300 dpi is 413 by 531 pixels. The DPI is written into the file (the JFIF header of a JPG, a pHYs chunk in a PNG), so print and layout apps open it at the physical size. Large reductions are drawn in halving steps, which keeps fine lines sharp in browsers that ignore the smoothing setting.

## Reference data

| Common size | Use |
| --- | --- |
| 20 KB | Exam and passport photo forms |
| 40 KB | A banner backup image |
| 50 KB | Signature and ID photo uploads |
| 100 KB | Many web forms and profile photos |
| 150 KB | A common ad or email image limit |
| 200 KB | Application forms |
| 500 KB | Blog and CMS uploads |
| 1 MB | Email and chat attachments |

| Aspect ratio | Decimal |
| --- | --- |
| 1:1 | 1.0000 |
| 4:3 | 1.3333 |
| 3:2 | 1.5000 |
| 16:10 | 1.6000 |
| 16:9 | 1.7778 |
| 21:9 | 2.3333 |
| 3:4 | 0.7500 |
| 2:3 | 0.6667 |
| 4:5 | 0.8000 |
| 9:16 | 0.5625 |

## Specs and sources

- [Meta for Developers: Images in link shares](https://developers.facebook.com/docs/sharing/webmasters/images/)
- [X Developer: Summary card with large image](https://developer.x.com/en/docs/x-for-websites/cards/overview/summary-card-with-large-image)
- [LinkedIn Help: Make your website shareable](https://www.linkedin.com/help/linkedin/answer/a521928)
- [MDN: CanvasRenderingContext2D.drawImage()](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)
- [MDN: HTMLCanvasElement.toBlob()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob)

## Limits

- Browsers limit the size of a canvas. Each side is capped at 12 000 px, and the area at 16.7 million pixels, the most iPhone and iPad browsers can draw; a larger size is reduced with the same proportions, and the tool says so.
- WebP has no DPI field, so a print size is written only into JPG and PNG.
- Enlarging an image makes it soft. The tool warns you when the new size is larger than the original.
- Animated images are resized from their first frame only.
- The common sizes are sizes people use. Check the current size a platform asks for before you upload.

## Questions

### What is the right OG image size?

1200 by 630 pixels, a 1.91:1 ratio. Meta recommends it, it is close to LinkedIn's 1200 by 627, and X crops it a little to 2:1. Choose Social card, then Open Graph, to crop any picture to a 1200x630 image.

### How big can an Open Graph image file be?

Meta's limit is 8 MB. Smaller is better: our own recommendation, not a platform rule, is to stay under about 300 KB, which a 1200 by 630 JPG or WebP at 80 to 85% quality usually is.

### How do I resize an image without losing quality?

Making an image smaller keeps it sharp. Making it larger cannot add detail. Resize from the original file, keep the aspect ratio, and save as PNG or high-quality JPG or WebP.

### How do I resize a photo to 35 x 45 mm or 2 x 2 inches?

Choose By size, switch the unit to mm or in, set 300 DPI and type the size. Untick Keep the aspect ratio and choose Fill so the photo covers the exact shape. 2 by 2 inches at 300 DPI is 600 by 600 pixels.

### Can I resize many images at once?

Yes. Set the size on one image, then choose Resize more images the same way and pick the rest. Each image gets the same settings and they download as one ZIP.

### What is the difference between fit, fill and stretch?

Fit shows the whole picture inside the new size and leaves margins. Fill covers the whole size and crops what does not fit. Stretch changes the shape of the picture to match.
