Skip to content
ToolkitHub

Image Resizer

Resize images by pixels or percent

Guide

Resizing images by pixels or percentage

By Logappradeep · ServiceNow developer

Almost every place you put an image has its own size expectations: a profile picture, a website hero banner, an online marketplace listing, a document upload form with a maximum width. Resizing changes the number of pixels in the image so it fits those requirements and, as a bonus, usually makes the file much smaller.

Pixels, percentage and aspect ratio

You can set the new size in pixels, such as 1200 by 800, or as a percentage of the original, such as 50 percent. With the aspect ratio lock on, changing the width updates the height automatically so the image keeps its proportions and nothing looks stretched. Turn the lock off only when you deliberately want to distort the image or when you will use a fit mode to handle the difference.

Fit modes for exact dimensions

When the target width and height have a different shape from the original, something has to give. The fit mode decides what:

  • Contain: the whole image is scaled to fit inside the box, leaving empty bands on two sides. Nothing is cut off.
  • Cover: the image fills the whole box and the overflow is cropped from the edges. No empty space, but part of the image is lost.
  • Stretch: the image is forced to the exact size, distorting proportions. Rarely what you want for photos.

What happens when an image is resized

The tool draws your image onto a canvas of the new size using the browser's built-in resampling, which calculates each new pixel from the surrounding original pixels. Downscaling discards detail you would not see at the smaller size anyway, so it looks good. Upscaling cannot invent detail; an image enlarged to twice its size will look softer, because the browser can only interpolate between existing pixels. The processing happens entirely in your browser tab, so photos are not uploaded.

DPI does not change pixel size

Changing an image's DPI value without changing its pixel dimensions has no effect on screens; it only tells printers how large to print it. For a print of a specific size, multiply inches by the target DPI: a 6 by 4 inch print at 300 DPI needs 1800 by 1200 pixels.

Tips

  1. Resize from the original, highest-resolution file rather than from a copy that was already shrunk.
  2. For websites, a width of 1200 to 2000 pixels covers most layouts, including high-density screens.
  3. After resizing, run the result through the Image Compressor for the smallest file.
  4. If a photo appears rotated after resizing, it relied on an EXIF orientation tag; fix it with the Crop tool's rotate option.

Frequently asked questions

Will resizing make my image blurry?

Making an image smaller keeps it sharp. Enlarging it beyond its original size makes it softer because no new detail can be created.

What is the difference between contain and cover?

Contain fits the whole image inside the target size and leaves empty space; cover fills the target size and crops the overflow.

Can I resize to an exact size without distortion?

Yes. Use cover to crop to the exact size, or contain to fit the image inside it with padding.

Is there a limit on image dimensions?

Very large images are limited by the browser's maximum canvas size and your device's memory, which is lower on phones.