Lean WP Tools

Getting started with LeanPixel

Install

  1. 1Download the plugin zip.
  2. 2In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip and click Install Now.
  3. 3Click Activate. You are taken to Media → LeanPixel.

Connect

  1. 1Enter your email address.
  2. 2Click “Get my free API key”. Your site is now connected.

Optimize your existing images

  1. 1On Media → LeanPixel, click “Optimize all images”.
  2. 2Progress is shown on the screen. You can leave the page; work continues in the background.

Settings

Compression level
Lossless keeps every pixel. Balanced is the default and suits most sites. Aggressive gives the smallest files.
Optimize new uploads automatically
On by default.
Keep a copy of every original
On by default. Needed for Restore.
Create WebP versions
On by default.
Create AVIF versions
Off by default. AVIF files are smaller still but take longer to create.
Serve the WebP/AVIF version
Off by default. Switch on to deliver the newer formats to browsers that support them.
Keep photo details (EXIF)
Off by default.
Maximum image size
Off by default. Choose 1920, 2560 or 3840 pixels to scale down larger images.

Restore an image

In the media library, click “Restore original” next to the image. To restore several, switch to list view, select them and choose “Restore originals (LeanPixel)” from Bulk actions.

Free up disk space

On Media → LeanPixel, the “Kept originals” box shows how much space they use. Click “Delete kept originals” once you are happy with the results. After that, Restore is no longer available for those images.

nginx

If your site runs on nginx, switch on “Serve the WebP/AVIF version” and copy the lines the plugin shows into your server configuration, then reload nginx.