Provisioning with optipng, gifsicle and libjpeg-progs



I’m experimenting with the EWWW Image Optimize plugin on a Trellis site. With a freshly provisioned Vagrant machine, I get warnings that optipng, gifsicle and jpegtran are not found when running a WordPress XML import.

The warnings go away after installing the respective Apt packages:

sudo apt-get install optipng gifsicle libjpeg-progs

I’m new to Ansible and want to install the Apt packages automatically. I haven’t been able to find any Ansible packages to install any of these tools (like bedrock-site-protect). Is there a recommended way to install Apt packages? Would I need to create my own Ansible playbook?


In main.yml just specify apt_packages_custom

  - optipng
  - gifsicle
  - libjpeg-progs


Thank you, @QWp6t! That is exactly what I needed!