Guides 11792 Published by

The guide explains how to install Trimage—a lossless JPEG and PNG compressor—on Ubuntu 20.04 using three methods: Snap, an optional PPA with apt, or compiling from source. It starts with a quick anecdote about shrinking wedding photos from 1 GB to under 400 MB in minutes while keeping quality intact. Step‑by‑step instructions show the snap command, how to add and use the stefan‑bernd/trimage PPA, and the GitHub clone plus CMake‑make install sequence for the latest build. A brief checklist at the end reminds readers that Snap is fastest, the PPA offers a traditional package manager experience, and source builds give access to bleeding‑edge features.



How to Install Trimage Image Compressor on Ubuntu 20.04

Want a quick way to shrink JPEGs and PNGs without losing quality?

Trimage does that in a couple of clicks, and you can get it up and running on 20.04 with just a few terminal commands.

Why Trimage is still useful

I once had to compress a stack of high‑resolution wedding photos after an unexpected shoot. My photo‑book software warned me the file size was too large, so I ran Trimage on the batch and cut the total weight from 1 GB to under 400 MB in less than five minutes. If you’re anything like me—needing a fast, reliable compressor that doesn’t turn your images into low‑res blobs—Trimage is worth the effort.

Snap installation – the quick route

Snap is bundled with Ubuntu 20.04 by default, so no extra setup is needed.

Run:

sudo snap install trimage

That’s it! The snap pulls in the latest stable binary and all its dependencies. Once installed, you can launch Trimage from your app menu or type trimage at the prompt.

Snap packages are confined but still give you the full application experience. No need to chase down missing libraries or worry about broken dependencies.

Manual PPA install (if you prefer apt)

If you’re a fan of the classic apt workflow, there’s a community PPA that keeps Trimage in sync with Debian’s build process:

sudo add-apt-repository ppa:stefan-bernd/trimage
sudo apt update
sudo apt install trimage

This method gives you the same binaries as the Snap but sticks to the traditional package manager. Just keep in mind that the PPA may lag a few releases behind the upstream project.

Compile from source (for bleeding‑edge lovers)

Need the latest commit or want to tweak something? Grab the code, build, and run:

git clone https://github.com/trimage/trimage.git
cd trimage
# Install build dependencies
sudo apt install build-essential cmake libgtk-3-dev libjpeg-turbo8-dev libpng-dev pkg-config qtbase5-dev
# Build
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install

Compile‑time builds are a bit of a dance, but you’ll get the freshest features and any bug fixes that haven’t hit the PPA yet.

Quick checklist
  • Snap: sudo snap install trimage – fastest, no fuss.
  • PPA (apt): add‑repo => sudo apt install trimage – traditional route.
  • Source: clone => build with CMake – for the adventurous.

Pick whatever feels right for your workflow and you’ll have a lossless compressor in minutes.