TL;DR: Always lock your aspect ratio when resizing (unless you want squished faces). Resize down freely — shrinking always looks good. Avoid upscaling more than 2x. Use 2x dimensions for retina displays. Keep the original file so you can always re-export.
We have all been there: you upload a perfectly nice photo to your website and it looks... wrong. Stretched horizontally like a funhouse mirror, or so pixelated it could pass for Minecraft art. The problem is almost always the same: the image was resized incorrectly.
Getting image dimensions right is one of those small details that makes a surprisingly big difference. A properly sized image loads faster, looks sharper, and fits its container without any weird distortion. Let me walk you through everything you need to know.
Resizing an image without locking the aspect ratio is how you turn your CEO's headshot into a pancake. Do not be that person.
Aspect Ratios: The One Thing You Must Understand
An aspect ratio is just the proportional relationship between width and height. Think of it as the "shape" of the image:
- 16:9 — Widescreen (YouTube videos, presentations)
- 4:3 — Classic screen ratio (older TVs, iPads)
- 1:1 — Square (Instagram posts, profile pictures)
- 3:2 — Most DSLR camera photos
- 9:16 — Vertical (Instagram Stories, TikTok, Reels)
When you resize, changing only the width (or only the height) without maintaining the ratio will squash or stretch the image. This is the number one resizing mistake in the wild. The math to keep things proportional is simple:
Original: 1920 × 1080 (16:9)
Want width of 800?
New height = 1080 × (800 / 1920) = 450
Result: 800 × 450 (still 16:9 ✓)
Common Sizes for Every Platform
Social Media Cheat Sheet
| Platform | Image Type | Size (px) |
|---|---|---|
| Square post | 1080 x 1080 | |
| Story / Reel | 1080 x 1920 | |
| Twitter/X | In-stream image | 1200 x 675 |
| Shared image | 1200 x 630 | |
| Shared image | 1200 x 627 | |
| YouTube | Thumbnail | 1280 x 720 |
Web Development Sizes
| Use Case | Width | Notes |
|---|---|---|
| Hero/banner | 1600-2000px | Full-width, retina-ready |
| Blog content | 800-1200px | Matches content column width |
| Thumbnail | 300-400px | Card grids, previews |
| OG image | 1200 x 630 | Social sharing preview |
Shrinking vs. Enlarging: Two Very Different Stories
Downscaling (Shrinking)
Making images smaller always works well because you are discarding extra pixels. A 4000px photo resized to 800px will look crispy. The only question is which algorithm to use:
- Bilinear: Fast, good quality. Works for most tasks.
- Bicubic: Slightly sharper, great for images with fine details and text.
- Lanczos: Highest quality downscaling. Best for photographs where sharpness matters.
Upscaling (Enlarging)
Making images larger is inherently problematic because you are asking the software to invent pixels that don't exist. Traditional algorithms produce blurry results. AI-based upscalers can do a surprisingly decent job for 2x-4x enlargement, but they are not magic.
Golden rule: never upscale more than 2x. If you need a bigger image, find or create a higher-resolution source. You cannot squeeze quality out of pixels that were never there.
How Browser-Based Resizing Works
Curious how our tool resizes images without uploading anything? It uses the browser's built-in Canvas API:
function resizeImage(file, maxWidth, maxHeight) {
return new Promise((resolve) => {
const img = new Image();
img.onload = () => {
let { width, height } = img;
// Maintain aspect ratio
if (width > maxWidth) {
height = Math.round(height * (maxWidth / width));
width = maxWidth;
}
if (height > maxHeight) {
width = Math.round(width * (maxHeight / height));
height = maxHeight;
}
const canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
const ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0, width, height);
canvas.toBlob(resolve, 'image/jpeg', 0.85);
};
img.src = URL.createObjectURL(file);
});
}
Everything happens inside your browser. The image never leaves your device. This means it works offline too, and your private images stay private.
Best Practices That Save You Headaches
- Always keep the original. Resize a copy, never the source. Once quality is lost, it is gone forever.
- Resize before compressing. Fewer pixels means less data for the compressor to work with, so you get smaller files.
- Think about retina displays. Export at 2x the display size, then let CSS handle sizing with
max-width: 100%. - Batch process for consistency. If you have 50 product photos, resize them all to the same dimensions for a clean, uniform grid.
- Use CSS for display sizing when you can. If you have a well-compressed 2x image, CSS can display it at any smaller size smoothly.
Quick Resize Cheat Sheet
Email signature: 300 × 100 px
Profile picture: 400 × 400 px
Blog featured: 1200 × 630 px
Product photo: 1000 × 1000 px
Desktop wallpaper: 2560 × 1440 px
Presentation slide: 1920 × 1080 px
Resizing images correctly is a small step that makes a big difference in how professional your content looks and how fast it loads. Take the two minutes to get your dimensions right — your visitors (and your site speed score) will thank you.
Try It Yourself
Resize any image directly in your browser with our free tool. Lock aspect ratio, set exact dimensions, and download instantly.
Open Image Resizer →