deftivo

How to Resize an Image to Exact Pixel Dimensions

Resize images to exact pixel sizes for forms, product listings and blogs. Learn aspect ratio, cropping first, percentage scaling, and why upscaling blurs.

Plenty of websites ask for an image of a specific size. A job application may want a photo of an exact width and height. A store may want product photos that are all the same shape. A blogging platform may set a maximum width. If you upload a picture that doesn’t fit, it may be rejected, cropped in an odd way or squashed.

Resizing to exact pixel dimensions isn’t hard once you know a few basics. This guide covers what “pixel size” actually means, how to avoid stretched images, why you should crop before you resize, and how to do it all in your browser without uploading your files anywhere.

Pixels, resolution and file size: three different things

Image requirements use these three terms, and they’re easy to mix up.

Term What it means Example of how it’s written What changes it
Pixel dimensions The width and height of the image in tiny dots (pixels) 1200 × 800 px Resizing or cropping
Resolution (DPI/PPI) How many pixels are packed into each inch when printed 300 DPI A setting stored in the file; it doesn’t change on-screen size
File size How much storage the file takes up 450 KB, 2 MB Pixel dimensions, format and compression level

For websites and online forms, pixel dimensions are almost always what matters. A DPI value has no effect on how big an image looks on a screen. If a form asks for “600 × 600 pixels”, you need to change the pixel dimensions. Changing the DPI won’t do it.

File size is related but separate. A smaller image usually makes a smaller file, but if a site has a limit like “under 1 MB”, you may also need to compress the image after resizing.

Check the requirements first

Every site sets its own rules, and they change from time to time. Before you start, read the upload instructions and write down:

  • Exact size or maximum size? “Must be 800 × 800” is not the same as “no wider than 1600 pixels”.
  • Shape (aspect ratio). Square, portrait or landscape? Some sites state a ratio such as 1:1 or 4:5.
  • File format. JPG, PNG, WebP or “any image”.
  • File size limit. Many forms have one.

Having these four facts in front of you prevents most failed uploads.

Keep the aspect ratio, or the image gets stretched

The aspect ratio is the relationship between width and height. A photo that is 3000 × 2000 pixels has a 3:2 ratio. If you resize it to 1500 × 1000, the ratio stays the same and nothing looks distorted.

Most resize tools have an option to keep (or “lock”) the aspect ratio. With it on, you type the width and the height is filled in for you, or the other way round. With it off, you can type any width and height you like. But if those numbers don’t match the original shape, the picture gets stretched or squashed. Faces look wide, circles become ovals and text looks wrong.

Only turn the lock off if you really want to distort the image, which is rare.

Crop to the right shape first, then resize

What if a site wants a square image and your photo is a wide rectangle? Resizing alone can’t fix that without stretching. The answer is to do it in two steps:

  1. Crop the image to the required shape (for example 1:1 for a square). Cropping removes the edges you don’t need and doesn’t distort anything.
  2. Resize the cropped image to the exact pixel size (for example 1000 × 1000).

You can do the first step with the Deftivo crop tool and then move on to resizing. Doing it in this order lets you choose what stays in the frame, so you don’t leave that to the website.

Situation What to do
Original already has the right shape Resize only, with aspect ratio locked
Original has a different shape Crop to the target ratio, then resize
Only a maximum width is required Resize by width with the ratio locked; height follows
Just need everything smaller Resize by percentage

Shrinking by percentage

Sometimes you don’t need an exact size. You just want a smaller image, for an email attachment or a quicker-loading blog post. Resizing by percentage is handy here. At 50%, both width and height are halved, so a 4000 × 3000 photo becomes 2000 × 1500. The aspect ratio is kept automatically, because both sides shrink by the same amount.

Percentage resizing works especially well for a batch of photos of different sizes, because each one shrinks in proportion.

Why enlarging small photos makes them blurry

Making an image smaller works well, because the tool is throwing away detail you don’t need. Making an image larger is different. The tool has to invent pixels that were never there. It guesses them from the neighbouring pixels, so the result looks soft, blurry or blocky.

If a site needs 1200 × 1200 and your photo is only 400 × 400, enlarging it will technically meet the requirement but won’t look sharp. Where possible, go back to the original, larger version of the photo (from your camera or phone rather than a copy saved from a messaging app) and resize that down.

How to resize an image with Deftivo

The Deftivo image resizer runs entirely in your browser. Your photos are processed on your own device and are never uploaded to a server.

  1. Open the resize image tool.
  2. Select the image or images you want to resize from your device (JPG, PNG or WebP).
  3. Under Resize by, choose Pixels or Percentage.
  4. For pixels, enter the Width (px) and/or Height (px) you need. Keep Keep aspect ratio ticked unless you deliberately want to change the shape.
  5. For percentage, pick a Scale preset: 25%, 50%, 75%, 150% or 200% (50% halves the size).
  6. Click Resize. A single image downloads automatically. If you resized several images at once, download each one or click Download all (ZIP) to get them together.

Your images keep their original format, so a JPG stays a JPG and a PNG stays a PNG.

Tips and pitfalls

  • Always work from a copy. Save the resized image under a new name so the full-size original stays safe.
  • Resize down, not up. Start from the biggest version of the photo you have.
  • Crop before you resize when the shape doesn’t match. Don’t switch off the aspect ratio lock to force it.
  • Check the file size afterwards. If it’s still over the limit, run it through the image compressor as a separate step.
  • Don’t confuse DPI with size. Changing DPI alone won’t satisfy a pixel requirement.
  • Look at the result at 100% zoom before uploading, especially text and faces, to catch blurriness or distortion.
  • Avoid resizing the same image again and again. Each round with a lossy format like JPG can lose a little quality. Go back to the original instead.

FAQ

Does resizing an image reduce its quality?

Making an image smaller usually keeps it looking sharp, because only extra detail is removed. Making it larger lowers quality, because the missing pixels have to be guessed. Saving a JPG many times can also add small losses.

What’s the difference between resizing and cropping?

Resizing changes the size of the whole picture and keeps everything in it. Cropping cuts away part of the picture to change its shape or framing. For a different shape at an exact size, crop first and resize second.

Why does my resized image look stretched?

The aspect ratio lock was probably off, and the width and height you entered didn’t match the original shape. Turn the lock back on, or crop the image to the target ratio before resizing. Then the proportions stay correct.

Are my photos uploaded when I use Deftivo?

No. Deftivo processes images inside your browser, so your files stay on your device. That makes it a good fit for personal photos, ID pictures or anything you’d rather not send to a server.

Tools in this guide

More guides