Image

The Complete Guide to Image Optimization

ToolOrbit Performance 2 min readUpdated
The Complete Guide to Image Optimization

Images are usually the heaviest thing on a web page. Optimising them is the single highest-leverage performance win for most sites.

Pick the right format

  • JPG — photographs and complex imagery.
  • PNG — graphics needing transparency or sharp edges.
  • WebP — modern format with excellent compression for both.
  • SVG — logos and icons that must scale crisply.

Compress intelligently

Most images can be compressed by 60–80% with no perceptible quality loss. The trick is choosing a quality level that removes invisible data while preserving detail — exactly what the Image Compressor recommends for you.

Always resize to the largest size you actually display. Serving a 4000px image into a 400px slot wastes bandwidth.

Serve responsibly

Use width and height attributes to prevent layout shift, lazy-load below-the-fold images, and provide responsive sources so each device downloads an appropriately sized file.

Lossy vs lossless at a glance

Which format does what
FormatBest forCompressionTransparency
JPGPhotographs, gradientsLossy, tunableNo
PNGGraphics, text, screenshotsLosslessYes
WebPWeb photos and graphicsLossy or losslessYes
SVGLogos, icons, diagramsVector (tiny)Yes

A repeatable optimization workflow

  • Resize first: match the largest display width, never ship 4000px into a 400px slot.
  • Compress second: target the quality where size drops sharply with no visible damage.
  • Compare sizes: if WebP is over 30% smaller at equal quality, ship WebP with a JPG fallback.
  • Confirm visually at 100%, not at a zoomed-out thumbnail.
The Image Compressor applies the resize-then-compress order and shows the before/after size, so you can see the trade of quality for bytes as you dial it in.

A file-size budget habit

Think of image weight as a budget you allocate per page, not per file. A 200 KB hero on a landing page full of 40 KB cards is fine; a 200 KB hero on a page with nine more 200 KB images is a page that makes phones sweat. Set a per-image ceiling by role — thumbnail, card, hero, full-bleed — and let the ceiling, not laziness, decide when to switch formats or lower quality. Weigh the saved kilobytes against the visible trade before you decide a JPEG is “fine” at 95% quality when it also looks fine at 78%.

  • Thumbnails under 20 KB; hero images under 250 KB are achievable for most photos.
  • Downgrade in steps, not jumps: one dialog pass of 5% quality steps shows where it breaks.
  • Once your tool set the ceiling, a quick checkbox pass per new asset keeps the site honest.

Frequently asked questions

Image optimization is the process of choosing the right format, compressing the file, and sizing it correctly so web pages load fast without sacrificing visible quality.

WebP is the modern default for most cases, offering strong compression. Use PNG when you need sharp transparency, JPG for photos at very small sizes, and SVG for logos and icons that must scale.

Most photos can be compressed 60-80% with no perceptible loss. The key is choosing a quality level that removes invisible data while keeping the detail you actually notice.


Tools mentioned

More reading

View all guides
When to Use Base64 Images (and When Not To)
Image

When to Use Base64 Images (and When Not To)

How to embed a Base64 image in HTML and CSS, when inlining helps, and the performance cost of doing it with large files.

2 min readUpdated
Crop vs Resize vs Compress: What Cropping Does to an Image
Image

Crop vs Resize vs Compress: What Cropping Does to an Image

What cropping changes, how it affects file size, and how it differs from resizing and compressing.

2 min readUpdated
PNG vs JPG vs WebP: Which Image Format Should You Use?
Image

PNG vs JPG vs WebP: Which Image Format Should You Use?

When to pick PNG, JPG or WebP, what lossy and lossless really mean, and how to convert without throwing away quality.

2 min readUpdated
Why Rotating an Image by 90 Degrees Loses No Quality
Image

Why Rotating an Image by 90 Degrees Loses No Quality

Why right-angle rotation is lossless, how it differs from rotating by an arbitrary angle, and how EXIF orientation causes sideways photos.

2 min readUpdated
How Image Filters Work: Grayscale, Sepia, Contrast and Blur
Image

How Image Filters Work: Grayscale, Sepia, Contrast and Blur

What each image adjustment does, the order that gives the cleanest result, and three looks you can build from the sliders.

2 min readUpdated
Favicon Sizes: Which Ones You Need and How to Add Them
Image

Favicon Sizes: Which Ones You Need and How to Add Them

Which favicon sizes browsers, iPhones and Android actually use, how to turn a logo into a clear 16px icon, and how to test it before launch.

2 min readUpdated
How to Pick a Color from an Image (Copy HEX & RGB Codes)
Image

How to Pick a Color from an Image (Copy HEX & RGB Codes)

Pick exact HEX, RGB, and HSL color codes from any image. Extract dominant color palettes and copy color codes in 1 click.

2 min readUpdated
Your Photos Know Where You Live: How to Remove EXIF Data
Image

Your Photos Know Where You Live: How to Remove EXIF Data

Every phone photo embeds GPS coordinates, device details and timestamps. Here is what EXIF data reveals, who strips it for you, and how to remove it yourself.

3 min readUpdated