Image and PDF compression guide
An application form wants a photo under 50 KB, an email caps attachments at 20 MB, a website wants a PDF under 2 MB. Compression is one of the most common tasks, yet some people end up with a blurry mess while others get files that look unchanged. The difference is method: resize to a sensible pixel size first, then lower quality a little. This guide uses measured data to explain how image and PDF compression work and how to do it well.
Why images are so large
File size depends mainly on four things: pixel count, how much detail the picture has, the format and the compression quality. A phone photo is usually 4032×3024, about 12 megapixels, and 2–5 MB as a JPG; an application photo needs only a few hundred pixels across — over a hundred times fewer pixels.
- Pixels: halving width and height leaves a quarter of the pixels, and the file usually shrinks to a third or a quarter.
- Detail: grass, leaves and crowds take far more space than blue sky or a white wall — several times more at the same size.
- Format: photos as JPG or WebP are an order of magnitude smaller than PNG (see the image formats guide).
- Quality: dropping JPG quality from 90 to 70 saves about 60%, with only a slight loss of quality.
Resize first, then lower quality: measured data
We scaled a 4032×3024 test photo to different sizes and saved each as JPG at several qualities. The test image has grass texture and noise, like a detailed landscape; portraits and indoor shots are usually smaller.
| Pixels | Quality 90 | Quality 80 | Quality 70 | Quality 50 |
|---|---|---|---|---|
| 4032 × 3024 | 2045 | 1163 | 843 | 581 |
| 3000 × 2250 | 1056 | 631 | 478 | 345 |
| 2048 × 1536 | 486 | 304 | 239 | 174 |
| 1600 × 1200 | 303 | 196 | 155 | 114 |
| 1280 × 960 | 202 | 133 | 106 | 78 |
| 1080 × 810 | 151 | 100 | 81 | 59 |
| 800 × 600 | 88 | 59 | 47 | 35 |
| 600 × 450 | 55 | 36 | 29 | 22 |
| 400 × 300 | 27 | 18 | 15 | 11 |
| 300 × 225 | 17 | 12 | 9 | 7 |
The table makes the point: to get a 12-megapixel photo to 100 KB by lowering quality alone, even quality 50 leaves 581 KB. Resize to 1080 pixels wide first and quality 80 lands at about 100 KB while still looking sharp. So resize to what the use needs, then fine-tune with quality.
Roughly how many pixels fit a size target
Based on the measurements above, these are reference sizes for 4:3 photos at JPG quality 70–80. Use the smaller pixel size for detailed photos and the larger for simpler ones. ID photos with plain backgrounds are usually smaller than landscapes at the same size.
| Target size | Approx. long edge (pixels) | Typical use |
|---|---|---|
| 20 KB | about 400–500 | Exam application photos, e-signatures |
| 50 KB | about 600–800 | Application and ID photos |
| 100 KB | about 1000–1100 | Profile pictures, form attachments |
| 200 KB | about 1400–1600 | Job and school portal uploads |
| 500 KB | about 2000–2400 | Web images, product photos |
| 1 MB | about 3000 | Sending a smaller copy of a phone photo |
If a form specifies both pixels (say 295×413) and KB, output at those pixels first and then lower quality; the KB limit is usually easy at the required size. Doc80’s target-size compressor lowers quality first and only scales the image down if that isn’t enough; turn off “Reduce dimensions when needed to meet the target” when the pixels must stay exact.
Doc80 counts 1 KB as 1024 bytes. Some systems use 1000 bytes, a difference under 3%, so leave a little headroom when you’re right at the limit.
What quality setting to use
- Quality 85–90: practically no visible loss; good for photos you will print or edit further.
- Quality 70–80: the usual range for web and uploads; hard to tell apart at normal viewing size.
- Quality 50–60: zooming in shows blur and blotches; use only when files must be very small.
- Below 40: obvious blocks and banding; not recommended.
Don’t compress the same image over and over. Each save loses a little more, especially when an image passes between apps at different qualities. Keep the original and compress from it each time.
Why PNGs and screenshots won’t shrink
PNG is lossless and has no quality setting, so a PNG only gets smaller with fewer pixels or fewer colours. Photos saved as PNG are huge — 17.6 MB for 12 megapixels in our test — and converting them to JPG makes them more than ten times smaller.
- A photo saved as PNG: convert to JPG, then compress to the size you need.
- Screenshots and images with text: keep PNG or use lossless WebP, and resize if smaller files are needed. Avoid JPG, which adds speckles around text.
- Transparent images: keep PNG or WebP; JPG turns transparency white.
How to compress a PDF
A PDF can hold text, fonts, vector graphics and images. Text and vectors are tiny; large PDFs are almost always large because of images — especially scans and phone-photographed documents, where every page is really a photo.
An A4 page scanned at 300 DPI is 2480×3508 pixels, about 8.7 megapixels — as many as a phone photo. Going by the measurements above, that is roughly 0.8 MB per page as JPG, so 20 pages pass 15 MB. For reading, 150–200 DPI is usually enough: at 150 DPI a page is 1240×1754 pixels, a quarter of the pixels at 300 DPI.
| A4 scan resolution | Pixels per page | Suitable for |
|---|---|---|
| 150 DPI | 1240 × 1754 | Ordinary documents, contracts, certificates |
| 200 DPI | 1654 × 2339 | Documents with lots of small print |
| 300 DPI | 2480 × 3508 | Text recognition (OCR), printing and archiving |
- Scans and photographed documents: use the PDF image compressor. It re-compresses the JPEG images inside and keeps text, links and page structure.
- Mostly-text PDFs: already small, with little to gain; a large one usually embeds fonts or images.
- Too many pages: split the PDF and upload the parts separately.
- Scanning at 150–200 DPI in black and white or greyscale works better than compressing afterwards.
What to check after compressing
- View at 100% and look at faces, text and fine lines for blur or blotches.
- Check the file size and pixels meet the requirement — Doc80 shows the exact bytes and dimensions.
- In PDFs, check small print, stamps and signatures are legible.
- Keep the original so you can compress again if you’re not happy.
Doc80 compresses images and PDFs in your browser; files are not uploaded to a server, which suits ID photos, contracts and other private documents.
Frequently asked questions
How do I get a photo under 20 KB?
Resize so the long edge is about 400–500 pixels (or to the required pixels for ID photos, such as 295×413), then lower JPG quality. The compress-to-20 KB page does both automatically.
Why is my photo blurry after compressing?
Usually quality was lowered without resizing first, so it had to go very low. Resize to a sensible size first and keep quality at 70 or above.
How do I compress a PNG?
PNG has no quality setting. Photo PNGs get much smaller as JPG; keep screenshots and transparent images as PNG and reduce their pixels.
Why won’t my PDF get smaller?
Doc80 compresses the JPEG images inside a PDF. Text-based PDFs are small already and have no images to compress; split very long documents.
Are my files uploaded?
No. Compression runs in your browser and files never leave your device.
Sources
The requirements here were checked against these official pages. Rules change, so confirm the latest version before you apply.