Niquelao Image Optimizer
Niquelao Image Optimizer
Description
Niquelao Image Optimizer automatically compresses images on upload and allows bulk re-optimization of your entire existing media library. It uses Imagick (preferred) or GD (fallback) — no external dependencies or API keys needed.
Features:
- Automatic optimization on every upload
- Bulk optimization of the existing media library
- Optional WebP conversion for every image
- Optional automatic .webp serving via .htaccess under the same original URL (no redirects)
- WordPress thumbnail optimization
- Automatic backup of the original file before processing
- Optional thumbnail backups (disabled by default) plus a Maintenance screen to scan, download and purge accumulated backups
- Detailed savings statistics per file type
- Copyright/authorship EXIF metadata preserved after stripping
- Optional automatic resizing with configurable maximum width and height
- Compatible with Imagick (preferred) and GD (fallback)
- No external dependencies — works on any shared hosting
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Imagick or GD extension enabled on the server
Installation
- Upload the
niquelao-image-optimizer/folder to/wp-content/plugins/ - Activate the plugin from Plugins Installed Plugins
- Configure it under Niquelao Optimizer Settings
Screenshots

Settings — image resizing, compression quality (JPEG/PNG/WebP) and processing options

Bulk Optimization — reoptimize your entire existing media library with a progress bar

Savings Statistics — totals by file type and a log of the most recent optimizations

Diagnostics — Imagick/GD availability, WebP support and uploads folder permissions

Settings — backup options and the new automatic WebP serving via
.htaccess(no redirects)
Maintenance — scan, download and purge accumulated
.niquelao-bakbackup files in batches
Faq
Yes. It uses the PHP Imagick or GD libraries, available on virtually all shared hosting providers.
Optionally. Enable “Save backup” in the settings to keep a .niquelao-bak copy alongside each processed file.
By default only the full-size original is backed up, not every thumbnail size. Go to Niquelao Optimizer Maintenance to scan for accumulated .niquelao-bak files, download a ZIP copy, and purge them in batches.
Yes. The EXIF/IPTC Copyright, Artist and Author fields are preserved after stripping the rest of the metadata.
Reviews
Changelog
1.5.1
- Fixed: Plugin Check findings — replaced direct
unlink()calls withwp_delete_file()in the Maintenance ZIP download and cleanup routines - Fixed: added justified
phpcs:ignoreannotations for the unavoidable directis_writable()/readfile()filesystem calls used to manage.htaccessand stream the temporary backup ZIP (no WP_Filesystem equivalent exists for these specific operations) - Fixed: added justified
phpcs:ignoreannotations for$_POST['offset']/$_POST['token']reads in Maintenance AJAX handlers, where the nonce is already verified viacheck_ajax_referer()insidecheck_permissions()earlier in the same method - Fixed: removed the remote Google Fonts
@importin the admin stylesheet (present since the first approved version) — admin UI now uses a local system-font stack, with no third-party assets loaded - Fixed: missing i18n wrapper on the “No Imagick/GD detected” troubleshooting copy in the Diagnostics page
- Fixed: hardcoded Spanish strings in the Media Library inline JS (single-image optimize button) now routed through PHP
__()and passed to the script as a translatable object - Changed: README.md rewritten to match the current version and defer to readme.txt as the single source of truth for the changelog, instead of duplicating (and drifting out of sync with) it
1.5.0
- Added: optional setting “Servir WebP automáticamente” — inserts/removes a
.htaccessblock (via WordPress’ insert_with_markers()/extract_from_markers()) that serves the.webpversion under the same original URL when the browser supports it, with no redirects and no URL changes - Added: status indicators for mod_rewrite availability,
.htaccesswritability and whether the rule block is actually installed - Added: the
.htaccessblock is automatically removed on plugin deactivation and uninstall, leaving no leftover server rules
1.4.0
- Added: optional “Keep thumbnail backups” setting (off by default) — when disabled, only the full-size original gets a
.niquelao-bakcopy instead of every generated thumbnail size, saving disk space and inodes - Added: new Maintenance screen to scan, download (as ZIP) and bulk-purge accumulated
.niquelao-bakfiles, processed in batches via AJAX to support shared hosting with execution time/inode limits - Added: uninstall routine now also removes the temporary ZIP folder and the new backup-thumbs option
1.3.5
- Fixed: settings page hook suffixes were calculated manually and didn’t match the real hook suffixes generated by WordPress (which derive from the top-level menu_title, not the menu slug), causing CSS/JS to fail to load on Bulk Optimization, Statistics and Diagnostics pages
- Fixed: admin styles/scripts now use the real hook_suffix returned by add_menu_page()/add_submenu_page() instead of a hardcoded guess
- Fixed: media library “Optimize” button (upload.php/post.php) registered its own style/script handle instead of relying on a handle that wasn’t enqueued on those screens
- Fixed: synced plugin version number across the main file header, the NIQUELAO_VERSION constant and readme.txt Stable tag
- Fixed: missing i18n wrapper on one bulk-optimization status string
1.3.2
- Unified license to GPL-2.0-or-later across all files
- Added full internationalization (i18n) via () and esc_html() functions
- Updated Text Domain header to match plugin slug (niquelao-image-optimizer)
- Removed deprecated load_plugin_textdomain() call (auto-loaded since WP 4.6)
- Created uninstall.php to clean up table, options and postmeta on uninstall
- Fixed require_once order: all includes at the top of the main file
- languages/ folder ready for translations
1.3.1
- Updated Plugin URI to kokeperez.es
1.3.0
- Added automatic resizing with configurable maximum width and height
- EXIF Copyright/Artist metadata now preserved after stripping (Imagick and GD)
1.2.0
- Atomic file writes using a temporary file
- Improved diagnostics page
1.1.0
- Bulk optimization with progress bar
- WebP conversion support
- Statistics page
1.0.0
- Initial release