Skip to content

shrpne/webp-jpeg-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webp-jpeg-comparison

🇷🇺 Читать на русском

Here I try to find out if it is really worth to convert images to webp instead of serve them as minified jpeg.

To minify jpeg I use mozjpeg lossy compression first and jpegtran lossless compression after. For 70% of images jpegtran do nothing, but for the rest it helps to save 10-40% more Looks like mozjpeg works fine without jpegtran since 3.2 version.

It compares saved size and loss in quality by SSIM

Usage

clone repo, then run:

npm i
npm start

You can put your own images into ./src

I suggest you empirically find out quality settings for imagemin-webp and imagemin-mozjpeg which will return equal SSIM for compressed images. And then check what compression method will save more bytes.

Results

Logo

For imageset from this repo quality settings to have equal SSIM will be: webp - 80, mozjpeg - 84. And webp will win with 28% more savings.

For different imagesets which I have tested with imagemin settings which returns equal SSIM, webp always win with savings varying from 20% to 30%.

About

Image minification comparsion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published