How to reduce JPEG file size without making the photo look worse
By Muhammad Sohaib and Luqman Ahmad · NexixLabs · Updated
A photo straight from a phone is usually 3–6 MB, and a camera JPEG can be twice that. That is far more than an email, a web page or an upload form needs. The good news is that most of those bytes are invisible: with the right steps a JPEG can shrink by 80–95% and still look the same on a screen.
Here are the five things that decide a JPEG’s size, in order of how much they save.
1. Resize: the biggest saving by far
A JPEG’s size grows with its number of pixels. A 12-megapixel phone photo is 4000 × 3000 pixels; scaled to 1920 × 1440 it has about four times fewer pixels, and the file shrinks roughly in proportion – with no visible difference on a laptop or phone screen.
As a rule of thumb: 1920 px on the long side for full-screen viewing and websites, 1200–1600 px for email and documents, and 800–1000 px for thumbnails and small upload forms. Only keep the full resolution for printing or further editing.
2. Choose a sensible quality setting
JPEG quality is a scale that controls how much fine detail the encoder keeps. Cameras and phones save at 90–100, which is overkill for viewing. Between 75 and 85 the loss is very hard to see in photos, and the file is often around half the size of a quality-95 version.
Below about 60, artefacts start to show: blocky skies, smeared textures and halos around sharp edges. If you need to go that low, it is a sign that the image should be smaller in pixels instead.
3. Use a better encoder
Not all JPEG encoders are equal. MozJPEG, developed by Mozilla, produces files that are typically 5–10% smaller than standard encoders at the same visual quality, while remaining ordinary JPEGs that open everywhere. Asset Compressor uses MozJPEG for every JPEG it writes.
4. Remove metadata you don’t need
Phone photos carry EXIF metadata: camera model, settings, date, often a GPS location and sometimes an embedded thumbnail. It is usually a small share of the file, but for tiny targets such as 20 KB every kilobyte counts – and removing the location is good for privacy anyway.
Re-encoding a JPEG in Asset Compressor removes EXIF metadata automatically. Keep your originals if you want to preserve dates and locations in your photo library.
5. Hit an exact size for upload forms
Forms rarely ask for a quality number; they ask for a maximum size such as “under 100 KB”. Guessing a quality and re-saving until it fits is tedious. A target-size tool does it for you: it tries quality levels and keeps the highest one that stays under the limit.
Combine it with resizing for very small targets. A 20 KB or 50 KB limit is easy to meet at 640–1000 px, but almost impossible for a full-resolution photo without heavy artefacts.
- Signatures and ID photos (10–50 KB): resize to 400–1000 px first.
- Application documents (100–200 KB): 1200–1600 px is enough to read small print.
- Large photos for listings or email (500 KB–1 MB): keep 2560–3840 px.
When to stop using JPEG
If the image is for your own website, WebP or AVIF will beat any JPEG setting: WebP is typically 25–35% smaller at the same quality and AVIF smaller still. For screenshots, logos and text, JPEG is the wrong format altogether – PNG or lossless WebP keeps edges crisp. Keep JPEG when you need maximum compatibility, such as email attachments and upload forms.
Quick checklist
To shrink a JPEG for most uses:
- Keep the original file.
- Resize to the largest size it will actually be shown at.
- Save at quality 75–85 with MozJPEG.
- Let the metadata go unless you need it.
- For a hard limit, use a target-size tool instead of guessing.
- Compare the result with the original before you send it.