Follow

So... I've been dithering my images to use on my personal blog (small filesize, etc.)

But this article suggests I should just be converting to WebP instead?

simplethread.com/why-your-webs

@dajbelshaw mozJPEG is better than WebP in most circumstances.

The best advice is still “GIF for animated cartoons, JPEG for photographs, PNG for everything else”.

@wizzwizz4 @dajbelshaw I've heard about the merits of mozJPEG, but I don't know how to put it in practice. I thought I knew my way around the Linux image processing stack, but–

mozJPEG is a patch to libjpeg-turbo?

`apt-cache search mozjpeg` turned up nothing.

@keturn @dajbelshaw hacks.mozilla.org/2014/08/usin

> There are no official mozjpeg binaries available, so you’ll have to build the project from source. Do this by downloading the source code for the latest release and following the instructions in the file BUILDING.txt.

The installation instructions are a bit complicated, but:

github.com/mozilla/mozjpeg/arc

cd v4.0.3
sudo apt install pkg-config autoconf automake libtool nasm

Then one of:

make
make install

(The latter installs into /opt.)

@dajbelshaw @keturn In that time, we have gained official Windows builds, but no Debian ones (I don't think).

@dajbelshaw makes me sad that masto doesn't support webp (as far as I can tell)

@dajbelshaw dithering really doesn't work together with compression techniques.

@dajbelshaw Browser support for WebP is good these days, it'll work for a blog.

There are still plenty of platforms (including Mastodon, Discord, etc) that don't recognize it as a supported image format, and having to think about which format to use depending on the forum is some mental overhead I could do without.

I think many people are waiting for JPEG XL before they change up their workflows. It has a better migration story than WebP and AVIF, and it is free from some of the constraints those formats inherited from their background as codecs for digital video.

@keturn Hmmm... so if I switched to WebP for my blog, and then shared my post via Mastodon, I guess there would be no image preview?

@dajbelshaw I was wondering that. If the platform passes the Open Graph attributes through as-is, it probably works fine.

But if the host validates those same way as it does for images submitted to the platform itself, not so much.

I haven't looked in to those details of how Mastodon does it for external links.

@dajbelshaw agreed. I love webp. Really good quality at fantastic file sizes.

@klaatu @dajbelshaw webp-lossless is good, but webp-lossy isn't so great. AVIF and JPEG-XL together can pretty much replace it as soon as Apple decides to add support for them in Safari.

WebP2 is also coming; it'll use AV1 instead of vp8 and will use its own lossless compression. It competes with AVIF. Like WebP and unlike AVIF, it'll support proper imageset animations (animated AVIFs are just AV1 videos).

@dajbelshaw for your Wordpress powered blog? If so I use Shortpixel. It not only handles multi-format conversations (large, thumbnail etc) as well as WebP or AVIF, but also works out front end delivery so I’m not troubled with technicals.

@robert Hmmm... thanks, hadn't seen that! Serving images from a CDN? I should revisit all of this to be fair.

@dajbelshaw they have two processes. ShortPixel Adaptive Images, where each image is served from the ShortPixel CDN.
Alternatively, the plugin sends the original images to their Image Optimization Cloud where they are compressed. ShortPixel then downloads the optimized images and the unoptimized originals are replaced with their optimized versions.
Worth a bit of a dig given the benefits.

@dajbelshaw A lot of websites - especially commercial sites - are using webp. They're a pain for me, because I don't know how to handle them in Perl (for eg. resizing) but they're probably better overall.

@Downes There must be an online converter somewhere, I guess? One that has an API?

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.