Skip to main content

8 - Lightening images

A ten-year-old site often carries photos of several megabytes. Iris lightens them: one by one, by selection, or folder by folder.

Where

  • In the details panel of an image flagged too heavy: the Lighten button.
  • For several ticked images: Lighten selection.
  • For a whole folder: the Lighten images button, at the top of the media library.

Two ways

  • Keep the format and the name (recommended): the image is brought within the frame set in the Options and recompressed in place, under the same name. No link changes, nothing is redirected. Only images flagged too heavy are processed.
  • Switch to WebP: even lighter, but the address changes. Iris rewrites the links in the content and redirects each old address to the new one (permanent redirect), which keeps search rankings and links from elsewhere.

An image that would not shrink by at least 5% stays as it is. GIF files are left alone, and in WebP mode an image referenced in a template file is left too: Iris does not modify template files.

The Lighten images screen

  1. The server: what it can do (Imagick or GD), and whether redirects work. On Nginx they do not, and the screen says so: keep the format then.
  2. What will be lightened: the way, the folder, the subfolders. Simulate first: nothing is changed, and you see for each image the size before, after, the dimensions, and the number of links involved. Lighten only becomes available after a simulation.
  3. The log: what was processed and what you saved.

The work runs in small batches, and can be paused: shared hosting is not brought to its knees.

Undo, then confirm

Originals are kept, set aside. While they are there, Undo all restores the original images exactly, the original links, and removes the WebP files. Once you have checked the site, Delete the originals cleans up; undoing is then no longer possible, but redirects stay.

File dates are kept: a lightened image does not jump to the top of the media library as if it had just arrived.

Up to date for Iris 3.0.041.