Sub topic 7
Balance quality and file size
This chapter covers how compression settings trade visual quality for file size, and how to judge that trade in Photoshop's preview. It assumes you can already open Export As, know the difference between JPEG and PNG, and have set your pixel dimensions. If any of that is unfamiliar, review the earlier chapters on dimensions and formats first.
Why quality and file size are linked
Every export format compresses pixel data. The compression is either lossless or lossy.
- Lossless compression (PNG, GIF) shrinks the file without changing any pixel values. You control file size mostly by reducing the number of colors, the pixel dimensions, or the amount of detail in the image.
- Lossy compression (JPEG, WebP lossy) discards information the eye is unlikely to notice. A quality setting tells the encoder how aggressively to discard it.
File size matters because it affects page load time, mobile data use, and in some cases whether a platform accepts the upload at all. The goal is not the smallest file or the best-looking file. It is the smallest file that still looks right at the size and place where people will see it.
How the JPEG quality setting behaves
Photoshop offers JPEG quality in several places, and the scales differ. Export As uses a percentage slider from 0 to 100. Save for Web (Legacy) uses a 0 to 100 scale plus named presets (Low, Medium, High, Very High, Maximum). The older Save As JPEG dialog uses a 0 to 12 scale. The same number does not mean the same thing across these dialogs, so judge by the preview and the file size, not by the number alone.
File size does not fall in a straight line as you lower quality. The curve is steep at the top and flat in the middle:
| Quality setting | Typical effect on a photo |
|---|---|
| 100% | Largest file. Gains over 90% are rarely visible. |
| 80% to 90% | Often a good starting range for hero images and portfolio work. |
| 60% to 80% | Often fine for content images viewed at normal size. |
| Below 50% | Blocky artifacts become obvious in gradients and around edges. |
These ranges are starting points. A noisy, detailed photo and a smooth gradient compress differently at the same setting.
The numbers in the chart are illustrative, not measured from a specific image. The shape is what matters: moving from 100 to 90 saves far more than moving from 60 to 50. This is why the last few percent of quality are usually the most expensive.
Use the preview to judge the result
Judging quality from a number alone is unreliable. Use the preview.
- Open File > Export > Export As.
- Set the format to JPG and the pixel dimensions you need.
- Drag the Quality slider and watch the file size shown in the dialog.
- Zoom the preview to 100%. Compression artifacts are easy to miss at a zoomed-out view.
- Pay attention to the areas that fail first: smooth gradients such as skies, sharp edges next to flat color, text, and skin tones.
A useful habit is to find the point where you first see a flaw, then raise the quality one or two steps above it.
PNG: size is controlled differently
PNG has no quality slider in the usual sense. The Export As dialog for PNG offers a Smaller File option (labeled Smaller File (8-bit) in some versions), which reduces the image to a limited color palette. The Save for Web (Legacy) dialog gives more direct control through PNG-8 and PNG-24.
| Option | Colors | Best for |
|---|---|---|
| PNG-24 | Millions, with full alpha transparency | Photos with transparency, smooth gradients, logos with soft shadows |
| PNG-8 | Up to 256 | Flat-color graphics, icons, simple logos |
Reducing a PNG to 8-bit can cut its size dramatically for flat graphics. It can also cause banding in gradients, because 256 colors cannot represent a smooth ramp. Dithering (scattering pixels of nearby colors) hides some banding but adds noise and can increase file size.
If a photo is saved as PNG-24, the file is often several times larger than the equivalent JPEG. Use PNG for photos only when you need lossless quality or transparency.
WebP and GIF considerations
WebP supports both lossy and lossless modes, and it usually produces smaller files than JPEG or PNG at similar visual quality. Recent Photoshop versions can export WebP. Where your version lacks the option, you may need a plugin or a separate conversion tool. Check that your destination platform accepts WebP before relying on it, since some social platforms re-encode or reject it.
GIF is limited to 256 colors per frame. Its file size depends on the color count, dither amount, and the number of animation frames. For anything with photographic detail, GIF produces both poor quality and large files. A short video format is usually the better choice for animation.
Edge cases that waste file size
Several habits inflate files without improving appearance.
- Exporting at pixel dimensions much larger than the display size. Resizing correctly often saves more than any quality setting.
- Leaving noise or grain in an image destined for heavy compression. Noise is expensive to encode. Reducing it slightly before export can shrink the file noticeably.
- Keeping hidden detail. Flattening or removing unused content before export does not change the pixels, but you should confirm that the exported canvas contains only what you intend.
- Embedding a large color profile or metadata when the file is small. For a small icon, a profile can be a large share of the total bytes.
- Re-compressing an already compressed JPEG. Each lossy save adds artifacts. Always export from your layered PSD or a lossless master, never from a previously exported JPEG.
Progressive JPEG is an option in some dialogs. It stores the image so it appears first as a blurry full image and sharpens as data arrives. File size is similar to baseline JPEG, sometimes slightly smaller. It mainly changes how the image appears during loading on slow connections.
Platform recompression
Social platforms usually re-encode the images you upload. This has two consequences.
- A very high quality upload does not guarantee a high quality result. The platform applies its own compression on top of yours.
- A heavily compressed upload gets compressed a second time, which compounds artifacts.
A practical approach is to upload a moderately high quality file (often 80% to 90% for JPEG) at the platform's recommended dimensions. This gives the platform's encoder good source data without wasting upload size. Check each platform's current specs, because limits and behavior change over time.
Set a size budget
Rather than choosing quality by feel every time, set a target and work backward.
| Image role | Example budget |
|---|---|
| Full-width hero image | Under about 200 KB |
| In-content photo | Under about 100 KB |
| Thumbnail or card image | Under about 30 KB |
| Icon or logo | A few KB |
These numbers are common rules of thumb, not standards. Your project may have its own performance budget. Export at the target dimensions, adjust quality until you meet the budget, then check the preview. If the image looks bad at the budget, you have three choices: reduce the dimensions, simplify the image, or raise the budget.
A worked example
Suppose you have a 1600 by 900 px landscape photo for a blog header.
- Convert to sRGB and resize to 1600 by 900 px.
- Open Export As and choose JPG.
- At 100% quality, the dialog shows roughly 900 KB.
- Lower to 85%. The size falls to about 300 KB, and the preview at 100% looks identical.
- Lower to 70%. The size is about 200 KB, and slight blocking appears in the sky gradient.
- Choose 78% as a compromise, about 240 KB with no visible flaw.
The sizes in this example are illustrative. Your results depend on the image content. The method is the same: lower the quality until the first visible flaw, then step back.
Common mistakes
- Trusting the quality number across different dialogs.
- Judging at a zoomed-out view and missing artifacts.
- Using PNG for photographs and producing very large files.
- Exporting JPEG from a previous JPEG.
- Treating the same quality setting as right for every image.
Exercise
You export a 2400 px wide landscape photo as a JPEG at 100% quality and get a 1.8 MB file. It will display at 800 px wide on a blog. Name two changes that reduce the file size, and say which usually gives the larger saving.
Show answer
Resize the image to the display size (800 px wide, or 1600 px for 2x screens) and lower the JPEG quality to roughly 80% to 90%, then check the preview at 100%. Resizing usually saves more, because the pixel count falls by a large factor (2400 to 800 px is nine times fewer pixels). Lowering quality from 100% to about 85% also saves a lot, but the saving from quality alone is smaller than the saving from removing unneeded pixels.
Exercise
A flat-color logo with a smooth gradient background exported as PNG-8 shows visible bands in the gradient. Give two ways to address this.
Show answer
Export as PNG-24, which supports millions of colors and removes the banding at the cost of a larger file. Alternatively, keep PNG-8 and enable dithering to hide the bands, accepting some noise and a possible increase in file size. A third option is to use a high-quality JPEG if the logo does not need transparency.