How to Resize Image Without Losing Quality - KeyCDN Support (2024)

Updated on May 14, 2023

How to Resize Image Without Losing Quality - KeyCDN Support (1)

Images are very important when it comes to marketing yourself, your brand, or your service on the web. We live in a time where visualization is everything, whether it is on your website, pinning a post on Pinterest, or sharing a post on Facebook. Studies showed that 40% of people will respond better to visual information than text. So it can be very important to have a good system in place when it comes to how to resize an image without losing quality. The last thing people want to see is a blurry photo, as this can give a bad first impression.

Understanding image resizing

Resizing an image involves changing its dimensions. The most common reasons for resizing images are to fit them into a specific space, reduce their file size for faster loading, or optimize them for different devices or platforms. However, resizing images can also result in a loss of quality, which can affect their appearance and usability.

When an image is resized, its pixels are either added or removed to adjust its dimensions. Adding pixels results in a larger image while removing pixels results in a smaller image. However, adding or removing pixels can also affect the image's quality, as it can result in pixelation, blurriness, or distortion.

Resizing an image without losing quality requires a careful approach to ensure that the image's original details and clarity are preserved.

Five ways to resize images without losing quality

In a previous post we discussed how to optimize images for performance, for SEO, and for social media. In this post we want to dive deeper into how to resize an image without losing quality. There are various ways to resize images without losing quality, and we will explore them in the following sections.

1. Use high-quality original images

The first step to resizing an image without losing quality is to start with a high-quality original image. If the original image is of low quality, resizing it will only make the quality worse. A high-quality image will have more pixels, which means that it will be easier to resize without losing quality.

When choosing an image to resize, ensure that it is a high-resolution image that has not been compressed or resized previously. This will ensure that the image retains its details and clarity when resized.

2. Use image editing software

Image editing software such as Adobe Photoshop, GIMP, or Pixlr can be used to resize images without losing quality. These programs allow you to adjust the image's size while maintaining its original quality.

Once you have adjusted the dimensions, save the resized image in a high-quality format such as JPEG, PNG, or TIFF. These formats are known for their high image quality and are suitable for most purposes.

3. Use online image resizing tools

If you do not have access to image editing software, you can use online image resizing tools. With these tools, you can upload an image and adjust its dimensions directly online.

Online image resizing tools such as Picresize, Canva, or Adobe Express offer various features such as cropping, rotating, and adding filters to images. They also allow you to adjust the image's dimensions while maintaining its original quality.

To use an online image resizing tool, upload the image and select the resize option. Adjust the image's dimensions and select the preserve quality or maintain aspect ratio option to ensure that the image's original quality is retained. Once you have adjusted the dimensions, save the resized image in a high-quality format.

4. Use plugins

If you are using a content management system (CMS) such as WordPress, you can use plugins to resize images without losing quality. These plugins offer various features such as automatic image resizing, image compression, and optimization.

If you are running on WordPress, Optimus image optimizer won't resize your image, but rather it will reduce it using lossless compression. The great thing about lossless compression is that you don't have to worry about the quality being lost. However, it might not result in as big of a decrease in file size either. So what is recommended is to downsize/downsample your images accordingly, and then you can compress them even further upon uploading to WordPress.

First of all, you should not always rely on CSS to resize your images, but rather upload them at scale when possible. This does get trickier though if you introduce retina images into the mix. See our post on how to use retina and WebP images.

5. Use command-line tools

If you are comfortable using the command line, you can use command-line tools to resize images without losing quality. Command-line tools such as ImageMagick allow you to resize images in bulk while maintaining their original quality.

To resize images using command-line tools, install the tool on your computer and open the command line interface. Navigate to the directory containing the images you want to resize and use the tool's command line syntax to specify the desired dimensions.

For example, to resize all images in a directory to a width of 800 pixels while maintaining their aspect ratio, you can use the following command:

mogrify -resize 800 *.jpg

This command will resize all JPEG images in the directory to a width of 800 pixels while maintaining their aspect ratio. The resized images will be saved with the same filename and file type.

Upsampling vs downsampling

While resizing an image refers to changing its overall size, upsampling and downsampling refer to changing the resolution of an image by adding or removing pixels. When using either process, it is important to choose the appropriate interpolation or anti-aliasing algorithm, preview the image at different resolutions, and choose the appropriate file format and compression level.

Upsampling an image

PNGs and JPEGs, also known as bitmap images, are made up of tiny little pixels. If you zoom in on a photo, like we did on the one below, you can actually see the individual pixels.

Upsampling an image actually refers to the process of enlarging the image bigger than the original source. According to Adobe, when you increase the number of pixels in this part of the dialog box (upsampling), the application adds data to the image. Generally you don't want to do this because the program is guessing where to add additional pixels. However, it also depends on what you are upsampling. With most PNGs you will probably notice a big difference due to they are already smaller and optimized for web. JPEGs and or photographs you can usually get away with a little upsampling before you notice some degradation, simply because their resolution is much larger to begin with.

As you can see below, once you get into the 3x the size realm it starts to become quite blurry. Usually you can get away with 2x upsampling before noticing a big drop in quality.

When your upscaling there are a few ways to maintain some of the quality without seeing huge degradation.

  1. One way in Adobe Photoshop is to use the "bicubic smoother" option when resampling your image. This can be found under "Image" and "Image Size" in Photoshop.
  2. Another is a popular premium plugin designed for Photoshop called ON1 Resize AI. The entire purpose of this plugin is to get you the highest quality photo enlargements, using its fractal technology.
  3. Irfanview and Gimp are also free alternatives which provide image size options which will maintain more of the quality than if you just resized it yourself. For the sampling/quality option you will want to ensure you choose the Lanczos option.

Downsampling an image

Downsampling an image works the opposite way. According to Adobe, when you decrease the number of pixels (downsampling), the application removes data. When data is removed the image also degrades to some extent, although not nearly as much as when you upsample. By removing this extra data ( downsampling) this results in a much smaller file size. For example, you can see below that our original image was 17.2 MB at 3000 by 2000 pixels. When we downsampled it to 1000 by 667 pixels this resulted in a file size of only 1.91 MB. It is also recommend to use the Bicubic sharper option if you are using Photoshop.

Save for web

So we can confirm that downsampling or sizing down your image definitely decreases the file size. You do however want to be careful. If you use the "Save for Web" feature in Photoshop changing the quality can have quite different outcomes. The original image below is 3.1 MB. On the left you can see bringing it down to 20% quality results in a file size of 486 KB, but also pretty bad pixelation. On the right is 50% quality which results in a 799 KB file. Generally aiming for a 50% reduction should result in decent quality depending upon the original image.

Summary

Resizing images without losing quality is essential for maintaining the original details and clarity of an image. When resizing images, ensure that you maintain the aspect ratio to avoid distorting the image. Also, choose a high-quality format such as JPEG, PNG, or TIFF to save the resized image. Finally, test the resized image on different devices and platforms to ensure that it appears correctly and retains its original quality.

As you can see both upsampling and downsampling images always results in some degradation to a certain extent. But by using different tools, such as Photoshop or Gimp, as well as a lossless compression plugin you can do a pretty good job at resizing an image without losing quality. At some point it is definitely up to the user and how much quality they require vs file size.

How to Resize Image Without Losing Quality - KeyCDN Support (2024)

FAQs

How to Resize Image Without Losing Quality - KeyCDN Support? ›

Use image editing software

How do I resize an image in CM without losing quality? ›

How to use Image Resizer To Centimeters
  1. Upload the photo;
  2. Set image width, height in centimeters and dpi;
  3. If you need, you can change the output image format: eg. to PDF.
  4. Click 'Resize';
  5. Compare the result and if everything is ok download the result.

How to reduce size of image in Photoshop without losing its quality? ›

How to Reduce the Size of an Image Using Photoshop
  1. With Photoshop open, go to File > Open and select an image.
  2. Go to Image > Image Size.
  3. An Image Size dialog box will appear like the one pictured below.
  4. Enter new pixel dimensions, document size, or resolution. ...
  5. Select Resampling Method. ...
  6. Click OK to accept the changes.
Apr 10, 2024

How do I reduce file size without losing quality? ›

If you've ever used a ZIP file, you're already experienced in lossless compression. With this form of compression, you get slightly reduced file sizes without losing any precious data. Lossless compression is great when every detail of your image counts, like when you're photo editing or printing a family portrait.

How do I resize a picture to improve quality? ›

The only way to resize a smaller photo into a larger, high-resolution image without highlighting poor image quality is to take a new photograph or re-scan your image at a higher resolution. You can increase the resolution of a digital image file, but you will lose image quality by doing so.

How do I resize a JPEG image? ›

In Windows, open your JPEG using Paint, click “Select All,” and adjust the height and width by percentage or pixel length. Then select “Save As” and choose “JPEG.” On Macs, open your JPEG in Preview, click “Tools” and “Adjust Size.” Adjust the height and width by percent or pixel length, click “o*k,” and click “Save.”

Why do images lose quality when resized? ›

When you shrink an image, you reduce its pixel information, which can lead to a loss of detail and make it look blurry. This blurriness will be most noticeable if the image is re-enlarged, as the missing details can't be restored. However, some resizing techniques can help minimize this blurriness.

How can I change the size of an image without losing quality online? ›

How to resize image without losing quality
  1. 1Upload an image. Upload files that you want to resize automatically.
  2. 2Choose the width and height. Select new image dimensions (aspect ratio), file size.
  3. 3Resize an image. Download the resized image with a new resolution in original quality.

How do I resize an image? ›

How to resize an image.
  1. Select. Upload your JPG or PNG to our image resize tool.
  2. Resize. Choose a size template based on the social platform or add your own.
  3. Continue editing. Instantly download your resized image or keep editing.

What is the difference between keep scale and keep image size? ›

When Keep scale is selected (default), cropping the image does not change the scale of the picture. When Keep image size is selected, cropping produces enlargement (for positive cropping values), shrinking (for negative cropping values), or distortion of the image so that the image size remains constant.

How can I increase the resolution of a picture for free? ›

The easiest way to upscale an image is using a free, AI powered image upscaler tool like Pixelcut. Upload your image, select desired upscale, and watch it improve the quality of your image.

How do I change the size of an image in cm? ›

  1. Upload the photo;
  2. Set image width, height and dpi;
  3. Change the image format if you need different output format: eg. PDF;
  4. Click 'Resize';
  5. Compare the result and if everything is ok download the result.

How do I know the size of a picture in cm? ›

On PC right click your image, click properties, go to details tab, and look in the image section. On a Mac, double tap the trackpad, select "get info" option, and you will see your image size. On android go to photos, select your photo and click the ... in the top right. Scroll to bottom of page to find image size.

How many pixels is 1 cm? ›

CM to PX Conversion Table
cmpx
1cm37.795px
2cm75.591px
3cm113.386px
4cm151.181px
21 more rows

Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6080

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.