<p>There is a lot of push towards better image file formats all around, especially on the web. And while personally I have already moved to WebP for all new content on Libre Arts, there are some valid use cases for PNG and JPEG.</p>
<p>You could be sharing a screenshot created by your desktop environment when you press the Print Screen button. Or maybe you have to use an old content management system that does not accept newer image file formats. Either way, it&rsquo;s a good idea to compress images before uploading.</p>
<p>And if you never liked using tools like optipng from a terminal, I have good news for you. Apparently, a while ago a French developer Hugo Posnic created a tiny application called <a href="https://github.com/Huluti/Curtail">Curtail</a&gt; that is pretty much a simplistic user interface for <code>optipng</code>, <code>pngquant</code>, and <code>jpegoptim</code>. Here is the video, the transcript goes below.</p>

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe src="https://www.youtube-nocookie.com/embed/MCKkSnKWHIs&quot; style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video" loading="lazy"></iframe>

<p>I saw Garrett LeSage mentioning that to a fellow Red Hat designer Máirín Duffy on Twitter, so thanks to you both :)</p>
<p>You can <a href="https://flathub.org/apps/details/com.github.huluti.Curtail">install Curtail from Flathub</a> or you can build it yourself which is an exaggeration because it&rsquo;s just running meson and ninja over Python code, there&rsquo;s no compilation involved per se.</p>
<p>Now, this is almost everything there is to see in this program:</p>
<p><img src="curtail-main-window.webp" alt="Main window of Curtail"></p>
<p>It&rsquo;s just foolproof, it&rsquo;s what you probably have grown to see in online services like tinypng.com.</p>
<p>You select whether you want compression to be lossy or lossless, and then you drag and drop files onto the main window (you can drop just the folder, in fact). Then they automatically get compressed, and you can see here names of files, old size, new size, and how much you saved in percents.</p>
<p><img src="curtail-compression-results.webp" alt="Compression results in Curtail"></p>
<p>Once compression is done, you can click the left arrow button here to go back to the main view.</p>
<p>Curtail does have some options. Go to the header bar, click the three-dots button, choose &lsquo;Preferences&rsquo;.</p>
<p><img src="curtail-general-options.webp" alt="General options in Curtail"></p>
<li>You can enable or disable the <em>preservation of metadata</em> which you don&rsquo;t need for things like icons but probably want for photos.</li>
<li>You can choose whether you want to <em>overwrite original images or create new ones</em>, in which case you also need to specify the text that will be appended to the base file name. Curtail suggests this <code>-min</code> text by default which sounds like a reasonable default.</li>
<li>You can also force Curtail to <em>use a dark version</em> of the user interface theme, if there is one.</li>
<p>Now, &lsquo;Compression&rsquo; and &lsquo;Advanced&rsquo; pages both have options for setting compression level. The former one is for lossy compression of PNG and JPEG:</p>
<p><img src="curtail-compression-options.webp" alt="Compression options in Curtail"></p>
<p>And the latter one has the setting for lossless PNG compression that is basically a trade-off between making smaller files and compressing faster:</p>
<p><img src="curtail-advanced-options.webp" alt="Advanced options in Curtail"></p>
<p>And now that is really all there is to see here. It&rsquo;s a nice little app. It does one job and it does it well. It&rsquo;s entirely possible that adding some more compression settings would be helpful, so if you feel that way, the project has a <a href="https://github.com/Huluti/Curtail/issues">bug tracker on GitHub</a> for feature requests.</p>