=== SSF Media Manager Image Optimizer ===
Contributors: ssfllc
Tags: webp, images, media-library, image-optimization, performance
Requires at least: 6.4
Tested up to: 7.1.2
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create separate WebP Media Library copies, compare measured sizes and keep your original images and existing URLs intact.

== Description ==

SSF Media Manager Image Optimizer is a local image-conversion companion. It works independently and does not need SSF Media Manager or a paid service.

Choose a JPEG or PNG attachment in Media > SSF Image Optimizer, or use its Media Library list-row action. Create a WebP copy, compare actual full-size bytes, preview it and insert the new attachment through the normal WordPress editor when you are ready.

* Single-image WebP conversion using WordPress GD or Imagick support.
* Fixed quality 82 and original dimensions for a simple reviewed workflow.
* New Media Library attachment with normal WordPress generated sizes and copied alt text.
* Original file, metadata, attachment ID and existing page URLs retained.
* Original attachment private status and parent inheritance retained for the new media record.
* Actual byte comparison, separate extra disk-usage figure, original and preview links.
* Copies that are not smaller are discarded.
* Idempotent retry for the same original file and settings.
* Capability, nonce, local path, MIME, dimension, file-size and memory guards.

This plugin does not edit metadata, organize collections, rename originals or review duplicates. Existing SSF Media Manager tools remain separate. It does not automatically replace website images or promise ranking or speed gains. Retaining original files and extra copies uses additional disk space.

Only local JPEG and PNG attachments up to 15 MiB, 16 megapixels and 8000 pixels per side are supported, subject to available host memory. The host must support WebP through a WordPress image editor. This release does not convert GIF, SVG, PDF, remote/offloaded media, existing WebP or AVIF. Colour profiles and EXIF may differ after conversion; compare important colour and text details visually.

== Installation ==

1. Back up your site and Media Library. Test on a staging site first.
2. Upload the ssf-media-manager-image-optimizer folder to wp-content/plugins, or install the ZIP via Plugins > Add New > Upload Plugin.
3. Activate the plugin. No API key, account, subscription or network connection is required.
4. Open Media > SSF Image Optimizer. In Media Library list view, choose Create WebP copy on a JPEG/PNG row; the attachment ID is filled for you.
5. Review the original and new copy before inserting the new attachment into content. Existing content continues to use its original URLs.

== Frequently Asked Questions ==

= Does it save disk space? =
No. It retains originals and adds new Media Library copies and responsive sizes. It reports smaller full-size transfer bytes and the extra storage used separately. Transfer savings occur only where you use the new copy.

= Does it send images anywhere? =
No. Processing happens on your hosting server through WordPress image editors. There is no telemetry, external API, licence endpoint, cloud service or payment step.

= How do I restore an image? =
The original is unchanged. Select its original attachment again in your page editor. No database replacement or URL rewrite needs reversing. The separate Pro add-on can help remove confirmed-unused optimizer copies with additional safety checks.

= Can it process a whole library automatically? =
Free is a useful individual-image workflow. The separately distributed Pro add-on adds reviewed batches, presets, CSV and derived-copy cleanup. No premium code is included in this Free package and Free does not expire.

= What if a request is interrupted? =
Check Media Library for the saved copy and retry only after inspecting the state. Completed identical conversions reuse their copy. A lingering conversion lock deliberately blocks a duplicate: an administrator must verify no process is running before removing that specific lock. No automatic stale-lock takeover is performed.

= What happens on deactivation or uninstall? =
Source and derived attachments remain usable. No files, media records or content are deleted automatically. Review and delete only copies you no longer use through WordPress or the separate guarded cleanup tool. Backup before cleanup.

== Privacy ==

This plugin stores image-source IDs, conversion settings, local file hashes and size/metadata records on derived attachments. It sends no images or personal data to an external service. A user with upload_files must also be allowed to edit the original attachment. Pro batch controls require administrator capability. No public endpoint accepts uploaded files.

This is not a secure document vault: ordinary WordPress upload file URLs can be publicly accessible even when their posts are private. New media records preserve source status and parent at conversion time, but later content/privacy changes are not automatically synchronized across separate copies. Review any copies when changing a source's privacy or usage.

== Changelog ==

= 0.1.0 =
* Initial local, original-preserving JPEG/PNG to WebP conversion workflow.

== Upgrade Notice ==

= 0.1.0 =
Initial release. Test conversion and visual quality on staging before using copies in public content.
