Another simple image optimizer

Περιγραφή

Automatically optimize uploaded images (jpg, png, gif, webp, svg, avif) using the Spatie image-optimizer library and binary files on your host system.

New uploaded images with all image sizes (thumbnails) will be optimized automatically.

Previously uploaded images can be updated in two ways:

  1. Use the command line interface (cli) and run wp media regenerate, which also triggers the optimization chain. If you don’t have cli access, some other plugin, that regenerates existing thumbnails should work, too (not tested, yet).
  2. The media library has a new column “File size” in the list view, which displays the new and the old file size. If an image is not optimized, there is a link named “Optimize” to run the optimizer directly.

Warning: Images are replaced with the optimized ones. Create a backup before testing this plugin. If this is a deal-breaker for you, don’t use it.

Important: If the needed binary files aren’t installed, this plugin won’t optimize anything. Don’t use it, if you don’t know, how to install them or if your web hoster doesn’t provide them.

Notice: WordPress has no support for SVG and AVIF files. Technically this plugin can optimize them, but I didn’t run any tests with plugins, that add SVG/AVIF support to WordPress. I was able to optimize svg and avif files automatically in a local test setup (see prepare-and-run-tests.sh in the tests folder and search for enable_svg_avif_upload).

For more information and notes about development, checkout the project README.md file on Codeberg

Optimization tools

Spatie image-optimizer will use these optimizers if they are present on your system:

At least jpegoptim and optipng should be installed.

You can find information about how to install the binary files in the Spatie image-optimizer README.md file.

Κριτικές

29 Σεπτεμβρίου 2023
Fantastic plugin. I was looking to implement spatie/image-optimizer manually on my WordPress theme but decided to do one check for a plugin before proceeding. After having a look through the plugin source code it seems to do exactly what I wanted (in a cleaner fashion too) without all the unnecessary frills and external API calls that so many other plugins seem to use. 10/10
Ανάγνωση όλων των 0 κριτικών

Συνεισφέροντες & Προγραμματιστές

“Another simple image optimizer” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν συνεισφέρει στη δημιουργία του.

Συντελεστές

Το “Another simple image optimizer” έχει μεταφραστεί σε 1 γλώσσα. Ευχαριστούμε τους μεταφραστές για τις συνεισφορές τους.

Μεταφράστε το “Another simple image optimizer” στην γλώσσα σας.

Ενδιαφέρεστε για την ανάπτυξη;

Περιηγηθείτε στον κώδικα, ανατρέξτε στο αποθετήριο SVN ή εγγραφείτε στο αρχείο καταγραφής αλλαγών ανάπτυξης μέσω RSS .

Σύνοψη αλλαγών

PHP 8.1 is required since 0.2.0.

For more details see project CHANGELOG.md on Codeberg