Elektrine lite

← Feed

@hukl@chaos.social

Post #1837953

2026-04-29 08:36 UTC

Are you still delivering images on your website in jpeg or png format? If so, consider switching to webp and avif. You can often save substantial amounts of storage space and traffic with equal if not superior quality. This will improve loading times for your users and reduce traffic costs (where that applies). Just batch converted a folder of pngs which ended up ~ 1/6th of the size (ymmv). for f in *.png; do magick "$f" -quality 95 "${f%.*}.avif" done (Equivalent jpegs to avif ~1/5th)

Replies (6)

  • @hukl@chaos.social 2026-04-29 09:03

    The key message is: use more efficient image formats than old school jpeg and png on the web! I don't care if it's webp, avif or jpegxl - as long as it looks good, uses less space and transfers faster, it's good. Easy win for saving resources - especially time and energy :) (I prefer avif atm because of wide support and very good performance for my use cases)

    Open ##2189445

  • @_nd_@fnordon.de 2026-04-29 08:52

    @hukl@chaos.social webp is a scourge *and* you must be aware the conversion is lossy. JPEG XL has a mode that supports lossless transformation between existing JPEG and JXL *and back*, at a size reduction of about 22% https://mina86.com/2025/use-jpeg-xl-already/

    Open ##2189446

  • @eWe@chaos.social 2026-04-29 08:54

    @hukl@chaos.social jxl ist immer noch das bessere Format. Echt Mist, das Google das im experimentellen Support versteckt hält… Aktuell funktioniert das nur auf Apple / Safari out of the box

    Open ##2189450

  • @tisba@ruby.social 2026-04-29 08:58

    @hukl@chaos.social to be fair, comparing lossless PNG with (in your example) lossy AVIF is of course resulting in good savings 😀 Out of curiosity, what kind of images have you converted? E.g. In the past I used to stick to PNG (with pngquant) for screenshots, because I've bitten too often with weird color issues.

    Open ##2189456

  • @lbenedix@chaos.social 2026-04-29 18:22

    @hukl@chaos.social I'm not convinced 🤨 I tried to convert the 525 images from a timelapse-camera and had to go to `-quality 55` to get comparable size to the jpgs.

    Open ##2189459

  • @supergarv@phpc.social 2026-04-30 12:45

    @hukl@chaos.social Ggf interessant: https://fershad.com/writing/power-consumption-jpeg-webp-and-avif/

    Open ##2189463