BlogHow to compress an image for email without making it look bad
How to compress an image for email without making it look bad
Most mail servers cap attachments around 25 MB. Here is how to shrink an image below that without visible quality loss.
You attach a photo, the mail server refuses it, and then you compress the image so much that it looks like it was faxed in 1994. That is the usual outcome, and it is avoidable. The reason most people over-compress is that they treat it as a single dial when it is really two decisions: which format, and how much quality to give up.
The image compressor on InBrowserKit makes both decisions explicit, and it runs in your browser, so a photo you are about to email to a client never passes through someone else's server.
Know the limit before you start
Gmail caps a single attachment at 25 MB and the whole message at 25 MB. Outlook.com matches at 25 MB. Apple's Mail app and most corporate Exchange servers sit somewhere between 10 and 25 MB, and corporate limits are often lower than the vendor's public number. When a photo gets rejected, the limit is not always what the error message claims — check whether you are also including a signature image, a scanned document, or a video.
If you are under the limit already, do not compress. A 4 MB photo that gets squashed to 900 KB looks noticeably worse and buys you nothing.
Choose the format before the quality setting
This is the step most guides skip. For an email attachment, WebP is the strongest default: it holds roughly the same visible quality as JPEG at 60–70% of the file size, and every current version of Chrome, Firefox, Safari and Edge can display it. The catch is that older desktop Outlook installs cannot, and a broken image in a client email is worse than a large one.
If the recipient's client is a genuine unknown, JPEG at quality 80 is the safe choice, and it still beats an uncompressed PNG by a wide margin. PNG is the wrong format for photographs — it is lossless, so a camera photo saved as PNG is typically five to ten times larger than the same image as JPEG, for no visible benefit. PNG earns its size only when the image has hard edges, transparency, or very few colours: screenshots, logos, diagrams, UI captures.
Why the slider feels wrong at the low end
Lossy compression does not degrade a photo evenly. It spends the first slice of your quality budget on detail you would notice — a full-screen JPEG at quality 85 looks effectively identical to the original. Below about 70, JPEG starts smoothing fine texture: grass, gravel, hair, fabric weave. That is where it starts looking like a bad scan.
That is why the compressor shows the original and converted sizes side by side. Run it once at 85 and once at 70 and compare. The difference in file size is usually dramatic; the difference in appearance is usually not. Pick the number where the file fits and stop compressing.
Resize before you compress
Compression alone cannot save a 48-megapixel photo. A modern phone image is often 4000×3000 or larger, and an email recipient views it on a screen a few hundred pixels wide. Resizing the long edge to about 1600 pixels — enough to look sharp full-screen on a normal monitor — cuts the pixel count by roughly 85% before any compression is applied.
The image resizer takes dimensions and a format in one pass. Doing resize first and compression second gives you two independent levers, which is far easier to reason about than one combined quality slider.
A short recipe that works
Resize the long edge to 1600 px. Export as JPEG at quality 85 if the recipient might be on old Outlook, otherwise WebP at 78. Check the resulting size. If it is comfortably under your limit, stop — further compression costs quality and buys nothing.
The one exception is anything you will print: keep the original, because print output wants resolution and a compressed image shows banding in large flat areas of sky or skin. Compress for sending, not for the archive. Full details on format choices live in the image tools collection.