How to resize an image by pixels without stretching or distorting it

person فريق سهلcalendar_today September 10, 2026schedule 4 min read
Illustration of resizing an image by pixels while keeping its proportions

A job application form asks for a headshot at exactly 400×400 pixels, and your original photo is a rectangle at a completely different ratio. You open an editor, type 400 into the width field and 400 into the height field without thinking twice, and your face comes out visibly stretched sideways because the program changed width and height independently, with no regard for the original proportion between them. This mistake happens constantly and doesn't take much to avoid.

Why does stretching or squishing happen?

Every image has a natural width-to-height ratio — 3:2 for an ordinary photo, say. When you change the width and height to numbers that don't preserve that ratio, the program stretches or squeezes the image's content to fill the new space regardless, and faces and shapes come out visibly distorted. The fix is changing just one dimension (the width, say) and letting the other be calculated automatically at the same ratio, instead of typing both numbers by hand every time.

The image resizer on Sahel preserves that ratio automatically by default: type a single number — width or height — and the other dimension is calculated at the same original proportion with no manual work, so the image shrinks or grows evenly with no visible stretching.

When is ignoring the ratio actually what you want?

Some platforms require an exact size at a ratio different from your original photo's — a perfect square from a rectangular photo, say — and there's no compromise that preserves the ratio and hits the required size at once. In that case, the technically correct move isn't stretching the image; it's cropping the extra part first with the image cropper to reach the required ratio without distortion, then resizing to the exact pixel size afterward.

Steps to resize an image

  1. Upload the image you want to resize.
  2. Type the required width or height in pixels, or pick a percentage to shrink or enlarge by.
  3. Make sure the keep-aspect-ratio option is on, unless you specifically need to ignore it.
  4. Check the resulting size shown before downloading.
  5. Download the image at its new size, ready for wherever it's needed.

A common mistake: enlarging a small image to a much bigger size

Resizing works well for shrinking images, but enlarging an already low-resolution image to a much bigger size doesn't add detail that was never there to begin with; the program just spreads the existing pixels over a larger area, and the image looks blurry or visibly "pixelated" the more you enlarge it. If the original is simply too small for a size you need, the real fix is getting a higher-resolution copy from the source, not enlarging the small one hoping it sharpens up.

A real case

A designer is preparing a cover image for a company site, and the system requires an exact 1200-by-630-pixel size for it to display correctly when the site's link is shared on social platforms. The photo he has from the photographer is a completely different size and ratio.

He uploads it to the tool, starts by cropping the extra part to get roughly the 1200:630 ratio without losing anything important in the image, then uses the resizer to lock the final size at exactly 1200×630 pixels. The result fills the required space precisely with no visible stretching or distortion, ready to upload straight to the site's content system.

Frequently asked

What's the difference between resizing by pixels and by percentage?

Pixels set the exact final size regardless of the original image's size, while percentage shrinks or enlarges relative to the current size — useful when you want to "shrink the image by half", say, without knowing the exact pixel dimensions you need.

Does image quality suffer when shrinking it?

Shrinking usually doesn't lose noticeable quality since it just reduces the pixel count, unlike enlarging, which adds new pixels by estimation rather than from real data that was actually there.

Can I resize and compress an image at the same time?

Resizing and compressing to a target kilobyte size are two separate operations; the image compressor can be used after resizing to also get a smaller file size, if that matters for your use case.

Is the image uploaded to a server while resizing?

No, processing happens directly inside your browser with nothing uploaded to any external server, so your image's privacy stays fully intact.

What's the best size for a cover image on social platforms?

Ideal sizes vary between platforms and sometimes change with each platform's updates, so it's best to check the currently required size from the platform itself before fitting your image to it precisely.

Try the tool

Open the image resizer, upload your photo, set the size you need, and get a copy at the right dimensions with no distortion.