cockpit-project.github.io icon indicating copy to clipboard operation
cockpit-project.github.io copied to clipboard

Add image optimization into the container & release notes script

Open garrett opened this issue 2 years ago • 3 comments

We ideally use oxipng on all the images and sometimes even pngquant. It would be ideal to bake these tools into our container creation and have the release notes automatically run oxipng -D on the resulting images.

pngquant is great too, but it is lossy and would need to be run manually (or be a manual step that's checked). oxipng is not lossy (visually) and is safe to automate.

garrett avatar Mar 08 '23 11:03 garrett

  1. Add oxipng in the container.
  2. Run oxipng from the release notes script.

garrett avatar Jun 28 '23 13:06 garrett

I think -D (deflate) is the new standard now, so oxipng itself without the -D is fine.

garrett avatar Jun 28 '23 13:06 garrett

@jelly mentioned that the official container (which we use) is Debian 10, which means we probably have to jump through hoops instead of just installing the command. So we might even need to curl it down from GitHub's releases.

(Otherwise, we'd have to install cargo and a rust compilation stack and then build/install oxipng.)

We may also want to include pngquant in the container, but not run it by default, as it is lossy and can change things.

garrett avatar Jun 28 '23 13:06 garrett