Skip to content

About

Resize, compress and convert JPG, PNG and WebP images to WebP entirely in your browser. One HTML file, nothing uploaded, works offline. By CMO Owls.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Compressor (private, in your browser)

Resize and compress JPG, PNG and WebP images, and convert them to WebP, entirely in your browser. Your images are never uploaded. One HTML file, no build step, no server, no tracking. Use it online, download the file and open it offline, or host it yourself.

Use it now: cmo-owls.github.io/image-compressor · also on cmoowls.com

Made by CMO Owls. MIT licensed.

At a glance

  • Resize first, then compress. Most oversized images are simply too many pixels for where they're shown.
  • WebP at quality 75–85 is the best starting point for photos and illustrations on websites; about 97% of browsers in use support it.
  • Private by design: the page uses the browser's own canvas encoder, so files never leave your device. You can check this yourself in the Network tab.
  • Measured: an 897 KB PNG illustration became 88 KB as WebP at the default settings; a 507 KB phone photo became 41 KB.

Contents

Why image size matters

Images are the heaviest thing most web pages load. The HTTP Archive's 2024 Web Almanac measured the median mobile page at 2,311 KB, with the median mobile homepage loading about 900 KB of images, more than any other kind of file. The largest image near the top of a page is often its Largest Contentful Paint, one of Google's Core Web Vitals, which should happen within 2.5 seconds. A 4 MB camera photo used as a 1200-pixel banner makes every visitor download far more than they see.

How to compress images for your website

  1. Open the compressor and drop in up to 20 JPG, PNG or WebP images.
  2. Choose WebP unless the place you're uploading to doesn't accept it.
  3. Set a maximum width: 1600 px for images inside an article, 2000 px for full-width banners, 400–600 px for thumbnails.
  4. Start at quality 80. Need a smaller file (for example under 100 KB)? Lower the quality in steps of 5, and if it's still too big at 60, reduce the width instead.
  5. Compare the result with the original at the size it's shown. Faces and text show compression first.
  6. Download each file or all of them, and replace the originals on your site.
  7. Set width and height on each <img> to stop layout shift, and don't lazy-load the main image at the top of the page.

Measured results

We ran two real images through this exact compressor in Chrome on 18 October 2026. Sizes are the downloaded files:

Setting 1024 × 559 PNG illustration (897 KB) 720 × 1280 phone photo, JPEG (507 KB)
WebP, quality 90 135 KB 65 KB
WebP, quality 80 (default) 88 KB 41 KB
WebP, quality 70 69 KB 32 KB
WebP, quality 60 61 KB 29 KB
WebP 80, resized to 800 px wide 53 KB already narrower
JPEG, quality 80 112 KB 79 KB
JPEG 80, resized to 800 px wide 69 KB already narrower

What the numbers show:

  • WebP beat JPEG at the same setting: 21% smaller for the illustration, 48% for the photo. Quality numbers aren't exactly equal across formats, so treat that as a rough comparison; Google's own study reports lossy WebP 25–34% smaller than JPEG at equal measured quality.
  • Resizing did more than lowering quality: going from 1024 to 800 px wide saved 40% at the same quality, while dropping quality from 80 to 60 saved 31% and started to blur fine edges.
  • PNG is the wrong format for illustrations and photos. PNG keeps every pixel exactly; the WebP versions looked the same at display size and were 90% smaller.

WebP vs JPEG vs PNG vs AVIF

Format Best for Browser support This compressor saves it?
WebP Photos, screenshots, illustrations About 97% of browsers in use Yes (recommended)
JPEG Photos where WebP isn't accepted Universal Yes
PNG Logos and graphics needing exact pixels or transparency Universal Yes (keeps PNG)
AVIF Photos, when your tooling can make it About 96% of browsers in use No: browsers can't save AVIF from a page yet

WordPress has accepted WebP uploads since version 5.8. If your site serves one image to every screen size, ask your developer about responsive images (srcset), so phones download a smaller version.

Is it private? Check for yourself

Nothing is uploaded, and you don't have to take our word for it. Each image is decoded and re-encoded with the browser's canvas toBlob() method, all in the page:

  1. Open the compressor and press F12 (⌘ + ⌥ + I on a Mac) to open the developer tools.
  2. Go to the Network tab.
  3. Drop an image in. No new request appears: nothing carries your image anywhere. (The only requests at all are the page loading its fonts and icons.)

Re-encoding also drops hidden metadata such as camera details and GPS location, which is useful for photos taken at home. If you need to keep copyright metadata in the file, add it back in your image editor.

Run it offline or host it yourself

  • Offline: download index.html and open it in your browser. Everything works without a connection except the web font.
  • On your own site: copy index.html anywhere static (GitHub Pages, Netlify, an S3 bucket, your CMS's static folder). There's no server code.
  • Fork it: this repo deploys itself to GitHub Pages on every push (see .github/workflows/pages.yml).

What it doesn't do

  • SVG or GIF files. SVGs are already small shapes; animated GIFs are better replaced with video.
  • AVIF output, because browsers can't encode it from a page yet.
  • Keep metadata. Copyright fields go along with camera and location data.
  • Change your website. Upload the new files yourself, or add automatic image optimisation to your build.
  • Find the heavy images for you. The Image Size Checker lists every image on a live page with its weight, or run cmoowls-seo images from free-seo-tools.

FAQ

How do I compress an image without losing quality? Resize it to the width it's shown at, then save it as WebP at quality 75–85. At that setting most photos look the same to the eye and are a fraction of the size.

How do I compress an image to 100 KB? Set the width to where it's shown, choose WebP at quality 80, and lower the quality in steps of 5 until it's under 100 KB. If it's still too big at 60, reduce the width instead.

Should I use WebP or JPEG? WebP for websites: almost every browser supports it and it's usually much smaller. Use JPEG where a platform or email tool doesn't accept WebP.

Why did my PNG get bigger? PNG is lossless, so re-saving a PNG as PNG can't throw detail away and may grow. Convert photos and screenshots to WebP instead.

Are my images uploaded? No. They're processed by your browser and never sent anywhere. The Network tab check above proves it.

How many images can I compress at once? Up to 20 per batch.

Sources

Related


Made by CMO Owls: 21 specialized AI marketing agents that work from one shared strategy. MIT licensed.

About

Resize, compress and convert JPG, PNG and WebP images to WebP entirely in your browser. One HTML file, nothing uploaded, works offline. By CMO Owls.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages