Images are usually the heaviest part of a web page, and the largest image near the top of the page is often the element that search engines’ page-experience measurements treat as the main content, the Largest Contentful Paint. Making images lighter is therefore one of the most effective speed improvements you can make. The goal is not the smallest possible file but the smallest file in which a visitor cannot see a difference at normal viewing size. This workflow gets you there in five steps.
Step 1: Resize to the size the image is actually displayed
The biggest savings come from pixel dimensions, not from quality settings. A 12-megapixel phone photo is 4032 × 3024 pixels. If your blog’s content column is 800 pixels wide, even a high-density screen showing two device pixels per CSS pixel needs only about 1600 pixels of width. Resizing that photo to 1600 × 1200 removes about 84% of its pixels before you touch the quality slider, and the file shrinks accordingly.
To find the display size, right-click the image on your live page, choose Inspect, and look at the rendered width in the browser’s developer tools, or check your theme’s documentation. Then aim for roughly twice that width:
| Where the image appears | Typical display width | Width to export |
|---|---|---|
| Full-width hero or banner | The full browser window | 1600–2400 px, ideally in several sizes |
| Image inside an article column | 600–800 px | 1200–1600 px |
| Cards, thumbnails and grids | 200–400 px | 400–800 px |
| Logos and icons | Small | SVG if possible, otherwise twice the displayed size |
Use Resize Image with the aspect ratio locked, and only enter the width. If the image also needs a different shape, crop it first with Crop Image.
Step 2: Choose the format
Photographs belong in WebP or JPEG. Screenshots, diagrams and graphics with text belong in PNG, or in lossless or high-quality WebP. Anything that needs a transparent background must be PNG or WebP. If you are unsure, our guide JPG vs PNG vs WebP walks through the decision.
Many content management systems, image CDNs and hosting platforms can resize images and create WebP versions automatically. If yours does, upload a well-sized, high-quality JPEG or PNG and let it generate the variants; compressing heavily beforehand only stacks two rounds of loss on top of each other.
Step 3: Pick a quality setting, then check it
For lossy formats, start at 80 for JPEG and around 75–80 for WebP. Then compare the result with the original side by side at 100% zoom, which is what Compress Image shows you. Lower the setting in steps of about five until you can see a difference, then go back one step. Small thumbnails often look fine at 60–70; large hero images and product photos that sell something deserve 80–90.
Knowing what to look for makes the check fast:
- Banding in smooth areas such as skies, walls and studio backgrounds, where a gradient turns into visible steps.
- Blocking: faint square tiles, most visible in flat or dark areas.
- Ringing: halos and speckles around text, logos and high-contrast edges.
- Smearing of fine texture, which makes skin, fabric or foliage look plastic.
- Color bleeding around small red or blue details.
Quality numbers are not comparable between programs. “80” in a browser, in Photoshop and in an online service are different amounts of compression, so judge by eye, not by the number. As very rough orientation, many sites try to keep large hero images to a few hundred kilobytes and ordinary in-article images well below that. These are rules of thumb, not limits: a detailed photo may need more, a simple one far less.
Step 4: Remove what you do not need
Photos from cameras and phones carry EXIF metadata: camera model, settings and often the GPS coordinates of where the picture was taken. On a public website that information is rarely useful and can be a privacy problem. Img Hut’s tools re-encode images through a canvas, so their output contains no EXIF data. For the same reason, embedded color profiles are dropped and colors are handled in the standard sRGB space; photos captured in a wide-gamut space such as Display P3 may look very slightly less saturated afterwards, which is rarely noticeable on the web.
Step 5: Serve the images well
A well-compressed file can still slow a page down if the HTML around it is careless. A few attributes make a large difference:
widthandheightlet the browser reserve space before the image arrives, which prevents the page from jumping around as it loads.loading="lazy"postpones images further down the page until the visitor scrolls near them. Do not lazy-load the main image at the top of the page; that delays exactly the content visitors are waiting for.srcsetandsizesoffer several widths so that phones download a smaller file than large desktop screens.fetchpriority="high"on the main above-the-fold image asks the browser to fetch it early. Current versions of the major browsers support it, and those that do not simply ignore it.
For example, an article image offered in two widths:
<img src="/images/team-1600.webp"
srcset="/images/team-800.webp 800w, /images/team-1600.webp 1600w"
sizes="(max-width: 840px) 100vw, 800px"
width="1600" height="1067"
alt="Our support team at the office"
loading="lazy">
If you still need to support very old browsers without WebP, wrap the image in a <picture> element with a WebP <source> and a JPEG fallback in the <img>.
Putting it together: one photo, start to finish
Suppose you want to add a 4032 × 3024 phone photo to an article with an 800-pixel column. Resize it to 1600 × 1200, which removes about 84% of the pixels. Compress the resized copy to WebP at quality 80 and compare it with the original at full size, paying attention to faces and to any sky. If it looks identical, try 75; if you notice smudging, go back to 80 or 85. Export an 800-pixel version as well for small screens, then add both to the page with srcset, width, height and loading="lazy". The whole process takes a couple of minutes and the page carries a small fraction of the original photo’s weight.
Common mistakes to avoid
- Compressing a JPEG again and again. Each save loses detail. Always start from the original file.
- Saving photos as PNG. Lossless compression cannot handle photographic noise efficiently, and the files are huge.
- Saving screenshots as JPEG. Small text becomes fuzzy; use PNG or high-quality WebP.
- Uploading 4000-pixel images and shrinking them with CSS. The visitor still downloads every pixel.
- Over-compressing the images that matter most. Product photos and hero images are worth a few extra kilobytes.
- Lazy-loading the first image on the page. It delays the main content instead of speeding things up.
Quick checklist
- Crop to the right shape, if needed.
- Resize to about twice the displayed width.
- Pick WebP or JPEG for photos, PNG or WebP for graphics.
- Start at quality 80, compare at 100% zoom, adjust in steps of five.
- Add
width,height,srcsetand, below the fold,loading="lazy".
Tools mentioned in this guide
Resize Image
Change width and height in pixels or by percentage, with an aspect-ratio lock and smooth downscaling.
Compress Image
Reduce JPG, PNG or WebP file size by re-encoding at the quality you choose, with a before-and-after comparison.
Crop Image
Draw a selection freely or lock it to 1:1, 4:5, 16:9 and other ratios, and see its exact size in pixels.
More guides
- JPG vs PNG vs WebP: How to Choose the Right Image Format – How each format stores pixels, where each one wins, what transparency and browser support mean in practice, and a five-question checklist for picking the right format.
- Social Media Image Sizes in 2026: Dimensions, Aspect Ratios and Cropping – Common image sizes for Instagram, Facebook, X, LinkedIn, YouTube and Pinterest as of 2026, safe zones that get covered or cropped, and how to prepare an image in three steps.