Skip to content
Optimization9 min read

Reduce image file size without visible quality loss

Reducing an image without visible loss does not mean preserving every byte. It means removing unnecessary pixels and information while checking the image at its real use size.

Updated August 30, 2026

Settings order

  • Crop unused areas.
  • Resize to the useful display dimensions.
  • Choose a format suited to the content.
  • Lower quality in small steps and inspect the output.
  • Remove metadata when it is not needed.

Start with dimensions

A photo thousands of pixels wide does not need to remain that large for a thumbnail, email, or narrow content column. Reducing width and height removes pixels directly and often delivers the cleanest saving.

Keep aspect ratio enabled. If an image is displayed at 800 CSS pixels on a dense screen, a 1600-pixel source may make sense. Exporting 4000 pixels usually adds nothing in that slot.

Sources: [1]

Match the format to the content

A photograph often works well as lossy JPG, WebP, or AVIF. A screenshot, raster logo, or interface with flat colors may survive better as PNG or lossless WebP.

Converting a photographic PNG to WebP can save substantial space. Converting a transparent logo to JPG adds a background and can create artifacts around edges.

Sources: [2]

Adjust quality without chasing a magic number

The quality control affects supported lossy outputs. Browser Canvas encoding accepts a quality value for JPEG and WebP, but the exact result depends on the browser implementation.

Start at 85, inspect the file, then try 78 or 72 when more reduction is needed. Watch edges, gradients, faces, noise, and small text. Return to the last acceptable setting.

Sources: [3]

Quality and compression effort are different

Quality generally controls how much visual information a lossy encoder may discard. Compression effort asks the encoder to spend more work finding a compact representation.

Higher effort can take longer without visibly changing the image. It does not guarantee a large saving for every format. Measure the result.

Expected effect of each setting
SettingMain effectRisk
DimensionsRemoves pixelsInsufficient detail
QualityRemoves visual informationVisible artifacts
FormatChanges storage methodLost compatibility or feature
CompressionOptimizes encodingLonger processing

Verify at the real use size

Compare source and output at 100%, then at the intended display size. A defect hidden in a thumbnail may be obvious in print, while a difference visible at 400% may not matter for email.

Keep the original and give the optimized copy a distinct name. When a platform imposes a strict limit, reduce dimensions and quality progressively instead of overwriting the source.

  • Inspect details and gradients
  • Check transparency
  • Open the file in its destination app
  • Record resulting dimensions and bytes
  • Keep the original separately

Test dimensions and quality

Create a copy, compare it at the intended size, and adjust without touching the original.

Optimize an image

Specialized tool: Compress to a target size

Compression questions

Sources and references

  1. [1]Serve responsive images - web.dev
  2. [2]Choose the right image format - web.dev
  3. [3]HTMLCanvasElement: toBlob() method - MDN Web Docs