How to compress JPGs without wrecking them
JPEG runs most of the photos on the web, and getting good results from it really comes down to understanding one setting. Here's how I think about it after years of shipping images on real sites.
The one slider that matters: quality
If you only learn one thing about JPEG, make it this: there's a quality number from 1 to 100, and it controls almost everything. JPEG throws away detail your eyes barely register to make the file smaller. A high number throws away very little; a low number throws away a lot.
The catch is that the relationship isn't linear. Dropping from 100 to 85 cuts the file size roughly in half and you genuinely cannot see the difference. Dropping from 85 to 70 saves a bit more for almost no visible cost. Below about 60 is where things start to fall apart — you'll see blocky patches in skies and a faint "halo" around text and sharp edges. That ugliness has a name (artifacts), and once you've seen it you can't unsee it.
Where I set the slider, in practice
These are the numbers I reach for without thinking. Treat them as starting points, not gospel — every image is a little different.
- 82–85 — my default for anything important: a hero image, a product's main photo, a portfolio piece. Looks pristine, still much smaller than the original.
- 72–78 — the bulk of web images. Blog photos, secondary product angles, anything in a grid. This is where most of your files should live.
- 60–70 — thumbnails and tiny previews where the image is the size of a postage stamp anyway.
- Below 60 — only when you're truly desperate for bytes and you've looked closely at the result first.
Two mistakes I see constantly
Re-saving the same JPEG over and over. JPEG is lossy, and the loss stacks. Edit, save, edit, save, and a few rounds later your photo looks like it went through a fax machine. Always keep the original somewhere and compress from it, not from a copy you already squeezed.
Using JPEG for the wrong things. JPEG is brilliant for photographs and terrible for logos, screenshots, and anything with crisp text or flat color. Put a logo through JPEG and the edges get a grubby smear around them. That's a job for PNG.
And a quick one: a 4000-pixel-wide photo displayed in a 600-pixel slot is just wasted bandwidth. Resize down to the size you'll actually show before you compress, and you'll save more than the slider ever will.
A small thing that also strips your location
Photos straight off a phone carry hidden EXIF metadata — camera model, settings, and often the exact GPS coordinates where the shot was taken. That's a few extra kilobytes you don't need and, more importantly, a privacy leak you probably didn't intend when you posted a picture of your living room for sale. Compressing here strips that data out as a side effect. Smaller file, less oversharing.
Using the tool above
Drag your JPGs onto the box (or pick a whole batch at once), nudge the quality if you want to, and check the before/after preview side by side. When it looks right, download. Your originals never move from your device — the compressed copies are generated right there in the browser.
The shortcut, if you skim
Set quality to about 80, resize the image to the width you'll actually display it at, and you've captured roughly 90% of the possible savings with no visible quality loss. That's the same ballpark Instagram and Facebook use on the images you upload to them.
Written by
Sanjay Sahani — Solution Architect
Sanjay Sahani is a solution architect with 21+ years building software. He created InstaShrink after one too many projects where “just compress the images” meant uploading client photos to a server he didn't control — so this tool does all its work inside your browser instead.
More about InstaShrink →