Almost every picture you handle is compressed. A 12-megapixel phone photo would be about 36 MB if every pixel were stored raw, yet the JPG your phone saves is usually 3 to 6 MB. Understanding what compression does, and what it costs, lets you make files smaller on purpose instead of by accident. This guide explains the ideas first, then the formats, then a practical workflow.
Lossy and lossless: the one distinction that matters
Lossless compression rearranges the data so it takes less space, and decoding gives back exactly the original pixels. PNG, GIF and lossless WebP work this way. It is like packing a suitcase more cleverly: everything is still there.
Lossy compression throws away detail that people are unlikely to notice, such as tiny colour differences or fine texture in busy areas. JPG, lossy WebP, AVIF and HEIC do this. The files are far smaller, but the discarded information cannot be restored. Saving a lossy file again re-compresses it, which is why a picture that is edited and re-saved many times slowly develops blocky patches and smeared edges.
What makes a file big
- Pixel count. A 4000 x 3000 picture has 12 million pixels; a 1200 x 900 version has about one million. Halving both width and height cuts the pixels, and roughly the file size, to a quarter.
- Detail and noise. A photo of a clear sky compresses far better than one of a gravel path or a night scene with sensor noise.
- Quality setting. In lossy formats the quality slider trades size for fidelity. The curve is steep: going from 100 to 85 often halves the file with no visible change, while going from 60 to 30 produces obvious artefacts.
- Format. Newer formats such as WebP and AVIF reach the same visual quality as JPG in noticeably smaller files.
Choosing a format
JPG (JPEG)
The universal photo format. Every browser, phone, printer, form and email client understands it. It has no transparency and is poor for sharp text and flat graphics, where you can see ringing around edges. Use it for photographs you need to share widely.
PNG
Lossless, with transparency. Excellent for screenshots, logos, diagrams and anything with text or hard edges. Photographs saved as PNG are usually three to ten times larger than the same photo as JPG, so avoid PNG for pictures of the real world unless you need lossless editing.
WebP
Developed for the web. It supports lossy and lossless modes and transparency, and typically produces files 25 to 35 percent smaller than JPG at similar quality. Support is now excellent in browsers, but some older desktop programs and upload forms still reject it, so keep a JPG or PNG copy when you are submitting files to other people.
AVIF
Often smaller again than WebP, with good handling of gradients and high dynamic range. Encoding is slower, and support in editing software is still uneven. A good choice for websites that serve different formats to different browsers, less so for files you send around.
HEIC / HEIF
The default photo format on recent iPhones. It stores a photo in roughly half the space of a JPG at similar quality. The catch is compatibility: Windows, many websites and printers need it converted first.
A practical workflow
- Resize first. Decide the largest size anyone will see. A website column rarely needs more than 1600 pixels wide; a phone screen is satisfied by 1080. Resizing is the biggest saving available.
- Pick the format by content. Photograph: JPG or WebP. Screenshot, logo or text: PNG (or lossless WebP). Needs transparency and small size: WebP.
- Compress with a quality target, not a guess. Start near 80 to 85 for photos. Compare the result at 100 percent zoom on the most detailed region, such as hair, foliage or text.
- Check the size against the limit. Application forms and email systems have hard limits. Aim 10 percent under, because some systems count kilobytes as 1000 bytes and others as 1024.
- Keep the original. Never overwrite your master file with a compressed copy.
Common mistakes
- Converting a JPG to PNG to "improve quality". The file grows, the picture does not get better.
- Saving a screenshot as JPG. Text becomes fuzzy and the file may be larger than the PNG.
- Compressing twice. Compress from the original each time rather than re-compressing a compressed copy.
- Ignoring colour profiles. Stripping or mishandling profiles can make colours look slightly different on some screens; for ordinary web and phone use the standard sRGB profile is fine.
Compression for specific jobs
Websites. Smaller images load faster and are friendlier to visitors on mobile data. Serve WebP or AVIF where you can and size images to the space they occupy.
Email and messaging. Most services limit attachments to a few tens of megabytes, and some apps recompress images anyway. Resizing to 1600 pixels on the long side is usually enough for viewing on screen.
Online forms. Passport-style photos and signatures often need to be under 20 to 100 KB. Crop tightly, reduce the pixel dimensions, then compress as JPG. Our step-by-step form guide covers this routine.
Printing. Print needs more pixels than screens: roughly 300 pixels per inch at the printed size. Do not shrink photos you plan to print.
Doing it with TinyFileHub
The File Size Reducer gives you one slider and a live before-and-after preview, so you can find the smallest acceptable size by eye. The Image Converter changes format, for example HEIC to JPG or PNG to WebP. Files are processed in your session and returned to you; they are not stored.
The short version: resize first, choose the format that suits the content, compress to a quality you have actually looked at, and keep your original. Do those four things and you will rarely send a file that is bigger than it needs to be.
Quality settings cheat sheet
| Use | Format | Typical quality | Long side |
|---|---|---|---|
| Website hero photo | WebP or AVIF | 75 - 82 | 1600 - 2000 px |
| Blog or article image | WebP or JPG | 75 - 85 | 1200 - 1600 px |
| Email or chat | JPG | 80 | 1280 - 1600 px |
| Passport-style form photo | JPG | 60 - 85 (to hit the KB limit) | Exactly as specified |
| Screenshot with text | PNG | Lossless | As captured |
| Print at A4 | JPG | 90+ | About 3500 px |
Treat the numbers as starting points. Different encoders map "quality 80" to slightly different results, and a photo with fine texture needs more headroom than a portrait against a plain wall. The only reliable method is to compare the result at full zoom on the busiest part of the picture and stop when you can no longer see the difference.