How to Compress an Image to a Target File Size

Published June 2026 · Practical steps for 20KB, 50KB, 100KB, 200KB, 500KB, and 1MB image limits.

Why target-size compression is different

Most compressors ask you to choose a quality value. But many real upload problems are not about a quality value; they are about a hard file size limit. A form may reject anything over 100KB, an email may feel too heavy above 500KB, or a visa-style upload may require a specific maximum size. In those cases, the goal is to reach the limit while preserving as much visible quality as possible.

The right workflow is: resize first, convert if useful, then adjust quality until the file lands below the target. If you only lower quality while keeping a huge 4000px image, you will often get a blurry file that is still too large.

Recommended file size targets

TargetBest forSuggested approach
20KBTiny icons, strict forms, small ID-style thumbnailsResize aggressively, use JPEG/WebP, avoid detailed backgrounds.
50KBProfile photos, small application images, thumbnailsResize to final display size first, then compress around quality 65-80.
100KBBlog images, form uploads, ecommerce thumbnailsUse WebP or compressed JPEG at sensible dimensions.
200KBGeneral web images and document uploadsOften reachable without obvious quality loss after resizing.
500KBEmail attachments, larger product photos, hero previewsGood target for larger images where detail matters.
1MBLarge photos, print previews, portfoliosUse when the image needs more detail or resolution.

Step-by-step workflow

  1. Check the current dimensions. A camera image may be 4000px wide even if the upload form only displays it at 600px.
  2. Resize to the final use case. For web pages, use the actual display size. For profile photos, 600-1200px is usually enough.
  3. Choose the right format. WebP is usually smaller for web use. JPEG is still reliable for forms that reject newer formats.
  4. Compress toward the target. Lower quality gradually rather than making one extreme jump.
  5. Inspect the result at normal size. If it looks good at the size users will see it, the compression is acceptable.
Fast path: Use the purpose-built pages for 20KB, 50KB, 100KB, 200KB, and 500KB.

Why your file is still too large

If an image refuses to go below the target, one of three things is usually happening: the dimensions are too large, the image contains too much fine detail, or the target is too strict for the visual quality you expect. Photos with grass, hair, fabric, text, and noisy backgrounds are harder to compress than simple portraits on plain backgrounds.

When quality starts looking bad, do not keep lowering it forever. Instead, reduce dimensions, crop unnecessary background, or switch to a simpler format/workflow.

Related guides and tools