<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Image-Conversion on /var/log/janio</title><link>https://devops.sarmento.org/en/tags/image-conversion/</link><description>Recent content in Image-Conversion on /var/log/janio</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 11 Apr 2026 11:27:35 +0000</lastBuildDate><atom:link href="https://devops.sarmento.org/en/tags/image-conversion/index.xml" rel="self" type="application/rss+xml"/><item><title>Automatically Converting Images to WEBP and AVIF</title><link>https://devops.sarmento.org/en/posts/automatically-converting-images-to-webp-and-avif/</link><pubDate>Thu, 26 Mar 2026 22:19:00 +0000</pubDate><guid>https://devops.sarmento.org/en/posts/automatically-converting-images-to-webp-and-avif/</guid><description>&lt;p&gt;The two previous posts built the monitoring infrastructure — &lt;a href="https://devops.sarmento.org/en/posts/monitoring-files-and-folders-with-launchd-watchpaths-in-practice/"&gt;&lt;code&gt;WatchPaths&lt;/code&gt; on macOS&lt;/a&gt;, &lt;a href="https://devops.sarmento.org/en/posts/monitoring-files-and-folders-on-linux-with-systemd-path-units-and-inotifywait/"&gt;systemd path units and &lt;code&gt;inotifywait&lt;/code&gt; on Linux&lt;/a&gt; — and promised the scripts would come later. The trigger is ready: launchd or systemd detects when something changes in a directory and fires a command. What is missing is the command itself.&lt;/p&gt;
&lt;p&gt;This post delivers the image conversion script that those triggers will fire. The goal is simple: PNGs and JPGs go into a folder, WEBP or AVIF come out. The originals are deleted or moved, depending on the configuration. The script detects which encoders are available on the machine and picks the best one among those installed, with a fallback chain that ensures it works even when the ideal tool is not present. If no compatible encoder is found, the script tells you what to install and from which package manager.&lt;/p&gt;</description></item></channel></rss>