Skip to content

Instantly share code, notes, and snippets.

@amanjuman
Last active August 26, 2022 11:41
Show Gist options
  • Save amanjuman/df4dbc3dd7b38a7e9ae2775cf7037f58 to your computer and use it in GitHub Desktop.
Save amanjuman/df4dbc3dd7b38a7e9ae2775cf7037f58 to your computer and use it in GitHub Desktop.
Image Optimization Tools for Linux (Ubuntu 20.04) and WordPress EWWW Optimization

Install Required Tools

sudo apt-get install -y build-essential libjpeg-progs liblcms2-dev libpng-dev libmagickcore-6.q16-3-extra

Install Image Optimization Tools

sudo apt-get install -y jpegoptim optipng pngquant pngtools gifsicle webp && sudo npm install -g svgo

Add Image Tools Path to Openbase Dir if you use RunCloud or GridPan based System

:/usr/bin/jpegoptim:/usr/bin/optipng:/usr/bin/pngquant:/usr/bin/svgo:/usr/bin/gifsicle:/usr/bin/cwebp

Install imagick on RunCloud

apt-get install php74rc-pecl-imagick && systemctl reload php74rc-fpm

Remove exec from RunCloud in order activate all image optimization tools

exec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment