Compressor.js
Docs
Examples
Grayscale
Watermark
Work with promise
GitHub
Explore
About
Compressor.js
v1.2.1
JavaScript image compressor.
Playground
Drop image here or
browse...
Options
strict
checkOrientation
retainExif
maxWidth
maxHeight
minWidth
minHeight
width
height
resize
none
contain
cover
quality
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
NaN
mimeType
convertTypes
convertSize
Input image
(original image)
Download
lastModified:
{{ input.lastModified || 'N/A' }}
lastModifiedDate:
{{ input.lastModifiedDate || 'N/A' }}
name:
{{ input.name || 'N/A' }}
type:
{{ input.type || 'N/A' }}
size:
{{ input.size | prettySize }}
Output image
(compressed image)
Download
lastModified:
{{ output.lastModified || 'N/A' }}
lastModifiedDate:
{{ output.lastModifiedDate || 'N/A' }}
name:
{{ output.name || 'N/A' }}
type:
{{ output.type || 'N/A' }}
size:
{{ output.size | prettySize }}
({{ ((1 - (output.size / input.size)) * 100).toFixed(2) }}% off)
Comparing images