Skip to content

JPEG compression #223

Answered by jcupitt
boan-jfm asked this question in Q&A
Discussion options

You must be logged in to vote

Hello again,

Those options are for mozjpeg:

https://github.com/mozilla/mozjpeg

It's mozilla's libjpeg fork with a range of compression improvements. It can make JPEGs roughly 30% smaller without breaking compatibility. It does tend to be a lot slower, though I think that has improved recently.

To use it from libvips, you need to build everything against mozjpeg rather than jpeg-turbo (the usual one). This usually involves building the entire libvips binary from scratch, unfortunately, though it depends what formats you want to support.

There's a sample dockerfile for libvips with mozjpeg on ubuntu 20.04 here:

https://github.com/jcupitt/docker-builds/tree/master/libvips-mozjpeg-ubuntu20.04

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by boan-jfm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants