{"id":173327,"date":"2023-04-25T14:01:37","date_gmt":"2023-04-25T14:01:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/another-simple-image-optimizer\/"},"modified":"2025-02-01T15:44:28","modified_gmt":"2025-02-01T15:44:28","slug":"another-simple-image-optimizer","status":"publish","type":"plugin","link":"https:\/\/eu.wordpress.org\/plugins\/another-simple-image-optimizer\/","author":20932585,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.3.0","stable_tag":"0.3.0","tested":"6.7.5","requires":"5.9","requires_php":"8.1","requires_plugins":null,"header_name":"Another simple image optimizer","header_author":"Raffael Jesche","header_description":"Automatically optimize uploaded images using the Spatie image-optimizer library and binaries on your host system (jpegoptim, optipng, pngquant, cwebp, gifsicle, svgo)","assets_banners_color":"","last_updated":"2025-02-01 15:44:28","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/codeberg.org\/raffaelj\/wordpress-another-simple-image-optimizer","header_author_uri":"https:\/\/www.rlj.me","rating":0,"author_block_rating":0,"active_installs":20,"downloads":1789,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"0.1.2":{"tag":"0.1.2","author":"raffaelj","date":"2023-04-25 14:01:11"},"0.1.3":{"tag":"0.1.3","author":"raffaelj","date":"2023-08-03 09:36:46"},"0.2.0":{"tag":"0.2.0","author":"raffaelj","date":"2023-11-06 20:27:59"},"0.2.1":{"tag":"0.2.1","author":"raffaelj","date":"2024-03-19 18:10:14"},"0.3.0":{"tag":"0.3.0","author":"raffaelj","date":"2025-02-01 15:44:28"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2","0.1.3","0.2.0","0.2.1","0.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[17209,133,237730,187,27956],"plugin_category":[50,52],"plugin_contributors":[220081],"plugin_business_model":[],"class_list":["post-173327","plugin","type-plugin","status-publish","hentry","plugin_tags-compression","plugin_tags-image","plugin_tags-jpegoptim","plugin_tags-optimization","plugin_tags-optipng","plugin_category-media","plugin_category-performance","plugin_contributors-raffaelj","plugin_committers-raffaelj"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/another-simple-image-optimizer.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Automatically optimize uploaded images (jpg, png, gif, webp, svg, avif) using the <a href=\"https:\/\/github.com\/spatie\/image-optimizer\">Spatie image-optimizer library<\/a> and binary files on your host system.<\/p>\n\n<p>New uploaded images with all image sizes (thumbnails) will be optimized automatically.<\/p>\n\n<p>Previously uploaded images can be updated in two ways:<\/p>\n\n<ol>\n<li>Use the command line interface (cli) and run <code>wp media regenerate<\/code>, 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).<\/li>\n<li>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.<\/li>\n<\/ol>\n\n<p><strong>Warning:<\/strong> 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.<\/p>\n\n<p><strong>Important:<\/strong> 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.<\/p>\n\n<p><strong>Notice:<\/strong> WordPress has no support for SVG files. Technically this plugin can optimize them, but I didn't run any tests with plugins, that add SVG support to WordPress. I was able to optimize svg files automatically in a local test setup (see <a href=\"https:\/\/codeberg.org\/raffaelj\/wordpress-another-simple-image-optimizer\/src\/branch\/main\/tests\/prepare-and-run-tests.sh\"><code>prepare-and-run-tests.sh<\/code> in the tests folder<\/a> and search for <code>enable_svg_avif_upload<\/code>).<\/p>\n\n<p>For more information and notes about development, checkout the <a href=\"https:\/\/codeberg.org\/raffaelj\/wordpress-another-simple-image-optimizer\/src\/branch\/main\/README.md\">project README.md file on Codeberg<\/a><\/p>\n\n<h3>Requirements<\/h3>\n\n<ul>\n<li>PHP function <code>proc_open<\/code> must be enabled (some web hosts disable it via <code>php.ini<\/code>)<\/li>\n<\/ul>\n\n<h3>Settings<\/h3>\n\n<p>Quality settings can be adjusted with constants in <code>wp-config.php<\/code>:<\/p>\n\n<p>Set quality for resizing images (GD\/Imagick)<\/p>\n\n<ul>\n<li><code>define('ASIO_RESIZE_QUALITY_JPEG', 100); \/\/ default: 82<\/code><\/li>\n<li><code>define('ASIO_RESIZE_QUALITY_WEBP', 100); \/\/ default: 86<\/code><\/li>\n<\/ul>\n\n<p>Set quality of optimizers<\/p>\n\n<ul>\n<li><code>define('ASIO_QUALITY_JPEGOPTIM', 90); \/\/ default: 85<\/code><\/li>\n<li><code>define('ASIO_QUALITY_PNGQUANT',  90); \/\/ default: 85<\/code><\/li>\n<li><code>define('ASIO_QUALITY_CWEBP',     85); \/\/ default: 90<\/code><\/li>\n<li><code>define('ASIO_QUALITY_AVIFENC',   70); \/\/ default: 63<\/code><\/li>\n<\/ul>\n\n<h3>Optimization tools<\/h3>\n\n<p>Spatie image-optimizer will use these optimizers if they are present on your system:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/tjko\/jpegoptim\">JpegOptim<\/a><\/li>\n<li><a href=\"http:\/\/optipng.sourceforge.net\/\">Optipng<\/a><\/li>\n<li><a href=\"https:\/\/pngquant.org\/\">Pngquant 2<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/svg\/svgo\">SVGO 1<\/a><\/li>\n<li><a href=\"http:\/\/www.lcdf.org\/gifsicle\/\">Gifsicle<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/speed\/webp\/docs\/precompiled\">cwebp<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AOMediaCodec\/libavif\/blob\/main\/doc\/avifenc.1.md\">avifenc<\/a><\/li>\n<\/ul>\n\n<p>At least jpegoptim and optipng should be installed.<\/p>\n\n<p>You can find information about how to install the binary files in the <a href=\"https:\/\/github.com\/spatie\/image-optimizer#optimization-tools\">Spatie image-optimizer README.md file<\/a>.<\/p>\n\n<!--section=changelog-->\n<p>PHP 8.1 is required since 0.2.0.<\/p>\n\n<p>For more details see <a href=\"https:\/\/codeberg.org\/raffaelj\/wordpress-another-simple-image-optimizer\/src\/branch\/main\/CHANGELOG.md\">project CHANGELOG.md on Codeberg<\/a><\/p>","raw_excerpt":"Automatically optimize uploaded images using the Spatie image-optimizer library and binary files on your host system (e. g. jpegoptim, optipng)","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/173327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=173327"}],"author":[{"embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/raffaelj"}],"wp:attachment":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=173327"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=173327"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=173327"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=173327"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=173327"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=173327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}