=== Niquelao Image Optimizer ===
Contributors: kokenet
Tags: image optimization, compress images, webp, imagick, performance
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatic PNG, JPEG and WebP image optimizer. No external binaries or API keys required. Works on any shared hosting.

== 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
* WordPress thumbnail optimization
* Automatic backup of the original file before processing
* 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 ==

1. Upload the `niquelao-image-optimizer/` folder to `/wp-content/plugins/`
2. Activate the plugin from **Plugins → Installed Plugins**
3. Configure it under **Niquelao Optimizer → Settings**

== Frequently Asked Questions ==

= Does it work on shared hosting? =

Yes. It uses the PHP Imagick or GD libraries, available on virtually all shared hosting providers.

= Are the original images saved? =

Optionally. Enable "Save backup" in the settings to keep a `.niquelao-bak` copy alongside each processed file.

= Is copyright information preserved? =

Yes. The EXIF/IPTC Copyright, Artist and Author fields are preserved after stripping the rest of the metadata.

== Screenshots ==

1. Settings panel: configure automatic resizing, compression quality and optimization options.
2. Bulk optimization: re-optimize every existing image in your media library.
3. Savings statistics: track saved space, average reduction and the optimization history.
4. Environment diagnostics: check available image libraries and required permissions.

== Changelog ==

= 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
