← Back to blog

How to Resize Images Without Losing Quality

Resizing an image sounds simple, but doing it wrong can turn a crisp photo into a blurry mess. Whether you’re preparing images for a website, social media, or email, here’s how to resize without sacrificing quality.

Why Resizing Can Degrade Quality

When you make an image smaller, the software must decide which pixels to keep and which to discard. When you make it larger, it must invent new pixels that didn’t exist. Both processes — downsampling and upsampling — can introduce artifacts if done poorly.

The key factors:

  • Resampling algorithm — Bicubic, Lanczos, and nearest-neighbor produce very different results
  • Aspect ratio — Changing the ratio stretches or squishes the image
  • Output format — Saving as JPEG after resizing adds another round of compression
  • Sharpening — A slight sharpen after downsizing can restore perceived detail

Best Resampling Algorithms

AlgorithmBest ForQualitySpeed
LanczosDownsizing photosExcellentMedium
BicubicGeneral purposeVery GoodFast
BilinearQuick previewsGoodVery Fast
Nearest NeighborPixel art, iconsPerfect (no interpolation)Instant

Rule of thumb: Use Lanczos for photos, nearest-neighbor for pixel art.

Method 1: Browser-Based (Fastest)

The quickest way to resize an image is with a browser tool like imgcrush.dev:

  1. Open imgcrush.dev
  2. Upload your image (PNG, JPEG, or WebP)
  3. Select “Resize” and enter your target dimensions
  4. Download the resized image

Advantages:

  • No software to install
  • Images stay on your device (client-side processing)
  • Handles batch resizing (up to 20/day free)

Method 2: CSS and HTML (For Web Display)

If you’re displaying images on a website, you often don’t need to actually resize the file — let the browser handle it:

<img src="photo.jpg" width="800" height="600"
     loading="lazy"
     srcset="photo-400.jpg 400w, photo-800.jpg 800w, photo-1200.jpg 1200w"
     sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px">

Using srcset serves different sizes to different devices, so mobile users don’t download the full-resolution image.

Method 3: Command Line (For Automation)

For batch processing or build pipelines, use ImageMagick:

# Resize to 800px wide, maintain aspect ratio
convert input.png -resize 800x output.png

# Resize with Lanczos filter (best quality)
convert input.png -filter Lanczos -resize 800x output.png

# Batch resize all PNGs in a directory
mogrify -resize 800x -filter Lanczos *.png

Or with sharp in Node.js:

const sharp = require('sharp');

await sharp('input.png')
  .resize(800, null, { fit: 'inside', withoutEnlargement: true })
  .png({ quality: 85 })
  .toFile('output.png');

Common Mistakes to Avoid

1. Resizing Up (Enlarging)

Making a small image larger creates pixels that don’t exist. AI upscaling tools have improved, but they’re adding detail that wasn’t in the original. For web use, it’s better to work with what you have.

If you must enlarge: Keep it to 150% maximum. Beyond that, quality degrades noticeably.

2. Ignoring Aspect Ratio

Stretching an image to fit a container distorts everything. Always lock the aspect ratio when resizing:

  • ✅ 1920x1080 → 960x540 (same 16:9 ratio)
  • ❌ 1920x1080 → 800x800 (squished)

3. Multiple Resize Passes

Each resize operation loses some detail. Resize once from the original, not from a previously resized copy.

4. Saving as JPEG After Resizing a PNG

If your source is PNG (lossless), resizing and saving as JPEG introduces compression artifacts. Keep the format consistent, or convert intentionally with the right quality setting.

Optimal Sizes for Common Use Cases

Use CaseRecommended SizeFormat
Website hero image1920x1080JPEG (80-85% quality) or WebP
Blog post image800x450JPEG or WebP
Thumbnail300x300JPEG or WebP
Social media (Instagram)1080x1080JPEG
Social media (Twitter)1200x675JPEG or PNG
Email header600x200JPEG (keep under 200KB)
Favicon32x32, 180x180PNG
App icon512x512PNG

The Best Workflow

For most use cases, here’s the ideal workflow:

  1. Start with the highest resolution original you have
  2. Resize once to your target dimensions using Lanczos resampling
  3. Apply a subtle sharpen (0.3-0.5 radius) after downsizing
  4. Compress the resized image (imgcrush.dev handles this automatically)
  5. Save in the right format — WebP for web, PNG for transparency, JPEG for photos

This single-pass approach preserves the most detail while achieving the smallest file size.

Try Image Optimizer for free

Compress, resize, and convert images directly in your browser. No signup required.

Open Image Optimizer

Get image optimization tips

No spam. Unsubscribe anytime.