=== Shrinkwell Image Optimizer ===
Contributors: levmedia123, freemius
Tags: AVIF, image compression, image optimization, media cleanup, webp
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.16.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Optimize images with WebP and AVIF, then review possibly unused media safely.

== Description ==

Optimize images locally, find possibly unused media, and reduce WordPress backup size safely.

Shrinkwell helps you compress images, generate WebP/AVIF, and review possibly unused media before it bloats your backups. Images are processed on your own server, with no external compression API and no account required.

Run a safe 5-image test first, review the results, then optimize your media library with more confidence.

= Built for agencies, freelancers and site owners =

Shrinkwell is designed for WordPress maintenance, handoff and cleanup work where you need to show what was optimized, what was skipped, and which media may need review.

= Safe image optimization =

* Run a 5-image test before touching the full library
* Compress JPEG and PNG files locally
* Generate WebP and AVIF within the monthly free limit
* Resize oversized images
* Strip EXIF/metadata where supported
* Optimize thumbnails alongside originals
* Keep original backups and restore individual images when needed

= Safe Media Cleanup =

* Scan your WordPress database for possibly unused media
* Review confidence levels and source evidence before cleanup
* See why each image is marked used, protected, possibly unused, or needs review
* Avoid blind deletion with Shrinkwell Trash
* Reduce media library clutter and backup size safely

= Delivery and proof =

* Confirm WebP delivery on a live frontend URL
* Review optimization logs with bytes saved, skipped images and skip reasons
* Run a site scan and apply recommended settings
* Check missing alt text and weak filenames without auto-rewriting content

= Compression profiles =

Choose a named compression profile or use custom settings:

* Balanced: solid savings with sensible quality preservation
* High: stronger reduction for image-heavy sites
* Near lossless: minimal visual change for portfolios and product photography
* Custom: a 1-10 strength slider for full control

Shrinkwell can generate and serve WebP with a safe JPEG/PNG fallback, without .htaccess edits or a CDN requirement.

= Free version =

The free version includes:

* 60 MB of image processing per month
* Local JPEG and PNG optimization
* WebP and AVIF generation within the monthly limit
* Resize oversized images
* Strip EXIF/metadata where supported
* Optimize thumbnails
* Preserve existing WebP media items
* Original backups and restore tools
* Media Cleanup database scan
* Possibly unused media preview
* Confidence and evidence details for cleanup review
* Optimization log
* Frontend WebP delivery test
* Site scan and recommended settings
* GD and Imagick support
* No external compression API

= Shrinkwell Pro =

Shrinkwell Pro is for larger sites and professional maintenance workflows. Pro unlocks unlimited optimization, auto-optimize on upload, background bulk optimization, safe bulk cleanup actions, Shrinkwell Trash, and advanced cleanup tools.

= What Shrinkwell does not do =

Shrinkwell does not send media files to an external compression API, require an account, charge per image, or automatically rewrite alt text or filenames.

== Privacy ==

Images are optimized on your own server. The free plugin does not transmit media files externally for optimization.

== License & Assets ==

Shrinkwell is licensed under GPLv2 or later.

The included Shrinkwell logo and wordmark are original Levmedia brand assets and are distributed with this plugin under GPLv2 or later.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate "Shrinkwell Image Optimizer" in WordPress.
3. Open Media > Shrinkwell.
4. Save your preferred settings and run the bulk optimizer.

== Frequently Asked Questions ==

= Does this use an external compression API? =

No. It uses the image editor available on your WordPress server, usually GD or Imagick.

= Does it convert images to AVIF? =

Yes, when the current server passes the local AVIF encoder and safety checks. AVIF can be slower and heavier than WebP on shared hosting, so Shrinkwell skips files that exceed safe local processing limits instead of risking timeouts.

= Can I restore originals? =

Yes. The plugin creates backup files when "Keep backups for restore" is enabled, and optimized items get a "Restore original" action in the Media Library.

= Does the SEO check rewrite alt text or filenames? =

The standard SEO check only reports missing alt text and weak filenames so you can review changes manually.

== Screenshots ==

1. Shrinkwell overview with optimization status, 60 MB free processing limit, current settings and recommended next steps.
2. Optimize media library with progress tracking, saved space and skipped image details.
3. Media Cleanup scan summary showing used media, possibly unused media, selected items and estimated cleanup size.
4. Image SEO check for missing alt text and weak filenames without automatic rewriting.
5. Backup storage overview with restore tools and safe backup cleanup.
6. Pro upgrade page with Free vs Pro comparison, 60 MB monthly Free limit and Pro workflow benefits.

== Changelog ==

= 1.16.4 =
* Improved Media Cleanup evidence with confidence levels, source labels and expandable result details.
* Improved Media Cleanup scanning for WordPress media blocks, WooCommerce galleries, variation images and product category thumbnails.
* Increased the Free monthly processing limit to 60 MB while keeping Pro unlimited.

= 1.16.3 =
* Fix: Corrected the Free build Freemius basename so "Activate Pro features" targets the premium package correctly.

= 1.16.2 =
* Tweak: Added the Pro tab page to the Shrinkwell admin interface and kept Free builds on the Free runtime configuration.

= 1.16.1 =
* Improved Media Cleanup detection for common page builders and serialized/JSON media references.
* Added stronger safeguards to avoid matching non-media IDs during database scans.
* Improved scan reliability for shortcodes, builder content, and generated thumbnail references.
* Improved Free plan limit messaging so monthly processing usage is clearly separated from total savings.
* Improved the Pro upgrade page with a clearer Free vs Pro comparison, stronger Pro benefits, and Media Cleanup positioning.
* Improved Pro license activation UI with clearer Freemius license-key validation and cache-busted admin assets.

= 1.16.0 =
* Feature: Added Media Cleanup database scanning with possibly unused, used, protected and needs-review classifications.
* Feature: Added Pro cleanup actions with reversible Shrinkwell Trash, original attachment ID preservation, restore and confirmed permanent deletion.
* Tweak: Included WebP and AVIF in Free within the monthly optimization limit; Pro unlocks unlimited optimization.
* Tweak: Updated Free and Pro feature gating, release copy and admin interface behavior.

= 1.15.27 =
* Tweak: Simplified media attachment details to show only the Shrinkwell savings percentage.

= 1.15.26 =
* Tweak: Show Shrinkwell optimization details on individual media attachment screens and media picker details.

= 1.15.25 =
* Tweak: Updated the WordPress Playground preview so it opens with realistic demo optimization data.

= 1.15.24 =
* Fix: Update the visible Total savings stat immediately after zero-savings re-optimization.

= 1.15.23 =
* Tweak: Made zero-savings re-optimization and SEO suggestion saving give clearer feedback and move automatically to the next SEO batch.

= 1.15.22 =
* Tweak: Improved re-optimization, SEO suggestion saving, WooCommerce recommendations, and clearer AVIF/zero-savings labels.

= 1.15.21 =
* Tweak: Balanced optimization now uses a stronger default and counts WebP/AVIF delivery savings in the main savings total.

= 1.15.20 =
* Tweak: Flag large PNG zero-savings images as optimization opportunities instead of grouping them under resize skips.

= 1.15.19 =
* Tweak: Improved admin tab order, overview next steps, settings save feedback, SEO filters, and backup savings context.

= 1.15.18 =
* Tweak: Removed the extra Saved space subtitle from the Overview stats card.
* Tweak: Improved safe SEO suggestions from descriptive image filenames.
* Tweak: Made the old-backup deletion copy clearer before files are removed.

= 1.15.17 =
* Feature: Added a WordPress dashboard widget with optimization, savings, pending, and image SEO status.
* Tweak: Removed the average savings percentage from the Overview saved-space card.

= 1.15.16 =
* Feature: Added a safe old-backup cleanup tool with preview, confirmation, and logging.

= 1.15.15 =
* Tweak: Made the Balanced optimization profile slightly stronger while keeping it safe for normal hosting environments.

= 1.15.14 =
* Tweak: Added average savings percentage to the Overview saved-space card.

= 1.15.13 =
* Feature: Added a zero-savings analysis report with reason filters, dismiss actions, and limited force re-optimization.
* Tweak: Added savings percentage to the backup manager table.

= 1.15.11 =
* Fix: Prevent generated WebP/AVIF cleanup from deleting or overwriting files that are registered as real WordPress media attachments.

= 1.15.10 =
* Fix: Stop recompressing existing WebP media items so WordPress and page builders keep their original WebP previews intact.
* Tweak: Keep WebP media items visible in Shrinkwell status and restore views, while limiting compression actions to JPEG/PNG sources.

= 1.15.9 =
* Fix: Protected WooCommerce product images from receiving too-small WebP/AVIF fallback sources when a larger product image is required.
* Tweak: Improved the Media Optimization running view with compact live stats and clearer pause/resume behavior.
* Tweak: Added a direct Optimize all action while keeping the safe 5-image test as the recommended first step.

= 1.15.8 =
* Tweak: Added Media Library filters for Needs action, WebP missing, AVIF missing, Ready to re-optimize, and Skipped safely.
* Tweak: Improved Media Library proof status with compact WebP/AVIF readiness details and clearer issue notes.
* Tweak: Added inline Media Library compression tests and single-image optimization feedback.
* Tweak: Added a delivery readiness check after the recommended settings scan.

= 1.15.7 =
* Fix: Returned the after-restore WebP rebuild action while keeping it out of the main Media Optimization action row.
* Fix: Kept primary button text white and prevented the help tooltip from being clipped inside the Media Optimization panel.
* Tweak: Updated Media Optimization flow copy back to English and aligned AVIF wording with server-supported AVIF generation.
* Tweak: Made live skipped-image details use the full panel width instead of a narrow column.

= 1.15.6 =
* Tweak: Reworked the Media Optimization screen into a simpler linear test, result, run, and Page Proof flow.
* Tweak: Replaced the four-step workflow bar with small progress dots and one visible primary action per state.
* Tweak: Collapsed the media log by default and kept WebP rebuild on the Advanced tab.

= 1.15.5 =
* Tweak: Improved the 5-image test follow-up so users can continue without a page reload.
* Tweak: Added an inline issue log and Page Proof action to the Media Optimization workflow.
* Tweak: Removed blue admin accents from Shrinkwell controls and summary icons.

= 1.15.4 =
* Tweak: Refined the Media Optimization screen layout with clearer summary cards, workflow steps, action hierarchy, progress status, and issue-center spacing.

= 1.15.3 =
* Tweak: Made AVIF settings available on any hosting environment when the server AVIF encoder test passes.
* Tweak: Removed the manual translation loader so WordPress.org can autoload translations without a Plugin Check warning.

= 1.15.2 =
* Tweak: Moved the Updates note below the Overview Status block.
* Tweak: Added a localhost-only AVIF test mode when the local server AVIF encoder test passes.

= 1.15.1 =
* Tweak: Added compact Media Library proof status for optimized state, saved size, WebP readiness, and safe-skip notes.
* Tweak: Added per-image compression testing from the Media Library without replacing files.
* Tweak: Added Media Library re-optimize actions when optimization settings have changed.

= 1.15.0 =
* Tweak: Added a translation-ready foundation, including plugin text domain loading and a generated POT file.
* Tweak: Moved remaining admin JavaScript user-facing strings into localized plugin data.

= 1.14.28 =
* Fix: Resolved Plugin Check filesystem and nonce warnings around writable-folder checks, restore guidance, and WebP crash markers.

= 1.14.27 =
* Tweak: Refined WordPress.org positioning around free local optimization, no account, no external API, WebP, backups, SEO checks, and proof reports.
* Tweak: Added a Quick Start section and refreshed screenshot captions for the public plugin page.
* Tweak: Added a client-side Page Proof .txt download button.

= 1.14.26 =
* Tweak: Improved WordPress.org tags and description to highlight image SEO and the local workflow.
* Tweak: Added a small in-plugin note that Shrinkwell is actively improved and WordPress.org updates will continue.

= 1.14.25 =
* Tweak: Reduced Page Proof visual noise by collapsing technical checks, long URL lists, cache headers, and scan notes by default.
* Tweak: Made WebP/AVIF encoder status less prominent in Settings.

= 1.14.24 =
* Tweak: Improved SEO suggestions so weak filenames, random IDs, and weak alt text are not reused as one-click suggestions.
* Tweak: Simplified the SEO table by removing the title field from the suggestion column and keeping the focus on alt text.

= 1.14.23 =
* Tweak: Reworked Advanced server safety status into clear status cards with plain-language explanations.

= 1.14.22 =
* Tweak: Cleaned up the SEO table spacing and removed the decorative-image control from the compact SEO action column.
* Tweak: Made Media Issue Center cards more compact and readable for long safe-skip messages.

= 1.14.21 =
* Tweak: Made Page Proof copy more beginner-friendly with a simple result, action checklist, and technical details last.
* Tweak: Made media log sections collapsible to reduce visual noise.
* Tweak: Made SEO suggestions auto-save when clicked and simplified the SEO table status display.
* Tweak: Removed duplicate "Suggestion:" wording from SEO suggestion text.

= 1.14.20 =
* Tweak: Added a guided after-restore flow that points users straight to WebP rebuild.
* Tweak: Replaced scattered skipped-image summaries with a Media Issue Center for Needs action, Safe skips, and Done.
* Tweak: Made SEO edits easier with use-suggestion, decorative image, empty-alt warning, and bulk save controls.
* Tweak: Added a Page Proof cache checklist for WordPress cache, Divi/static CSS, hosting/CDN/Varnish, and browser cache.

= 1.14.19 =
* Fix: Existing WebP files that are larger than the original are no longer counted as usable delivery files or served in frontend markup.
* Tweak: Page Proof now reports larger-than-original WebP copies separately from usable WebP files.
* Tweak: Page Proof now diagnoses the most likely delivery cause, including disabled delivery settings, cache-hidden rewrites, background images, and missing WebP files.
* Tweak: Page Proof copy now says "usable WebP files" to avoid implying every existing WebP copy should be served.

= 1.14.18 =
* Tweak: Simplified Advanced server status and moved technical engine details behind a disclosure.
* Tweak: Formatted PHP memory and safe image size values for normal users.
* Tweak: Clarified Page Proof cache/delivery guidance before release upload.

= 1.14.17 =
* Tweak: WebP-only runs now distinguish safe skips from real errors in the live progress UI.
* Tweak: Restore can recreate a missing current media file when a matching Shrinkwell backup exists.
* Tweak: Improved restore and WebP skip messages so missing files, already-WebP sources, and not-worth-keeping WebP copies are clearer.

= 1.14.16 =
* Tweak: Page Proof now ignores favicons and meta/social icons when measuring visible page image delivery.
* Tweak: Added a rewrite preview to show whether Shrinkwell can add WebP picture markup before cache/CDN output.
* Tweak: Added cache header details to Page Proof reports for easier cache troubleshooting.

= 1.14.15 =
* Tweak: Improved backup restore notices so partial restore failures show how many images need attention.
* Tweak: Added inline Image SEO alt text and title editing from the SEO scan table.
* Tweak: Split the media optimization log into attention items first and completed items below, with clearer skipped-image labels.

= 1.14.12 =
* Tweak: Added a compact skipped-image summary that groups recent optimization issues by cause.
* Tweak: Improved media optimization queue clarity while keeping the detailed log available.

= 1.14.11 =
* Fix: Page Proof now reports partial WebP evidence correctly instead of showing "not detected" when WebP markup exists but coverage is incomplete.
* Tweak: Added clearer cache guidance when WebP files are ready but cached page HTML still exposes JPG/PNG URLs.
* Tweak: Added Page Proof data for distinguishing missing WebP files from delivery/cache coverage issues.

= 1.14.10 =
* Added a lightweight frontend HTML pass so theme logos, page builder images, and other images outside post content can receive WebP delivery.
* Added WebP replacement for local upload background images when a matching WebP file exists.
* Improved WebP handling for image preload links on normal frontend pages.
* Added developer filters to disable frontend HTML, background image, or image preload rewriting on edge-case sites.

= 1.14.9 =
* Made the page proof scan stricter by detecting local JPG/PNG URLs that still appear uncovered even when WebP files are ready.
* Added WebP delivery coverage and uncovered image examples to the copyable page proof report.
* Improved page proof messaging for partially covered pages, including theme logos, page builder images, preloads, and cached markup.

= 1.14.8 =
* Split the media optimization queue into safe to optimize, already optimized, and too-large counts.
* Fixed the active optimization filename after skipped images so the running status no longer appears stuck.
* Clarified the public translation path through WordPress.org translation packs.

= 1.14.7 =
* Improved media optimization queue clarity when remaining images are too large for safe local processing.
* Count only processable images as ready to optimize and point oversized images to Advanced limits.
* Added a modest in-plugin WordPress.org review prompt after real optimization results.

= 1.14.6 =
* Made contextual help tips more subtle and kept them inline with their labels.

= 1.14.5 =
* Added visible log entries for single-image restores so restore testing is easier to verify.

= 1.14.4 =
* Improved page proof scan wording when WebP files exist but page HTML does not clearly serve them, and avoided negative savings wording.

= 1.14.3 =
* Added lightweight contextual help tips for settings, format delivery, advanced limits, and media optimization.

= 1.14.2 =
* Renamed homepage proof wording to page proof and added a copyable page proof report.

= 1.14.1 =
* Restored KPI icons using CSS masks so they remain visible while keeping Plugin Check output clean.

= 1.14.0 =
* Fixed Plugin Check findings for hidden files, escaped SVG output, sanitized AJAX input, and modern WordPress.org translation loading.

= 1.13.9 =
* Expanded the frontend proof scan so any same-site page URL can be scanned.
* Added page-level payload evidence that compares found original JPG/PNG file sizes with available WebP files.

= 1.13.8 =
* Increased dashboard KPI icon size for clearer visual balance.

= 1.13.7 =
* Added a frontend proof scan that checks live page HTML for WebP sources and flags JPG/PNG background images for manual review.

= 1.13.6 =
* Centered the dashboard metric icons and kept them magenta by preventing label styles from overriding the SVG color.

= 1.13.5 =
* Clarified the pending media metric by showing "Ready to re-optimize" when existing optimized images need processing again for current settings.

= 1.13.4 =
* Fixed metric card icons by replacing small admin-font icons with lightweight inline SVG icons.
* Clarified that the 10 MB local processing limit is a starting point and that pixel dimensions also affect memory use.

= 1.13.3 =
* Replaced prototype-style metric icons with lightweight Dashicons-based admin icons.
* Added a maximum file-size setting for local optimization limits.
* Improved skipped-image details with file size, dimensions, and configured limits where available.
* Improved the Image SEO scan with thumbnails, status labels, and practical suggestions.
* Prepared the plugin for WordPress locale-based translations through a languages directory.

= 1.13.2 =
* Kept AVIF disabled in the free local-first flow to avoid memory-heavy failures on normal hosting.
* Made skipped-image messages shorter and easier to read during media optimization.
* Modernized the media optimization log styling.

= 1.13.1 =
* Updated the admin UI look and feel with stronger header actions, modern tabs, larger metric cards, and softer dashboard cards.
* Renamed the user-facing library workflow to Media Optimization.

= 1.13.0 =
* Renamed the Bulk tab to Library for a clearer user-facing workflow.
* Merged Optimize and Formats into one Settings page.
* Made recommended settings more conservative by leaving AVIF optional instead of enabling it automatically.
* Added safer local AVIF limits and raised the WordPress image memory limit before local processing where WordPress allows it.

= 1.12.5 =
* Refined the Bulk page into a more compact control center with a circular progress meter.
* Added live run stats for saved space and skipped images.
* Kept the safe workflow visible without adding extra advanced filter choices.

= 1.12.4 =
* Added a clear warning to keep the Bulk page open while optimization is running.
* Added a browser leave warning during active bulk optimization.
* Added visible skipped-image errors during the current run.
* Added client-side error logging so failed browser requests also appear in the recent bulk log.

= 1.12.3 =
* Made bulk optimization more reliable on shared hosting by processing one image per request.
* If one image request fails, Shrinkwell now skips that item, logs the problem, and continues instead of stopping the whole run.
* Added local safety checks for very large files and dimensions to reduce memory-related failures.
* Removed the visible advanced filter block from the Bulk page to keep the scan and bulk workflows clearer.
* Updated the admin header and bulk copy around local-first, safety-focused positioning.

= 1.12.2 =
* Simplified the Overview page by removing internal launch/proof panels and moving site status into a compact sidebar.
* Removed automatic bulk-start remnants from the recommendation flow.

= 1.12.1 =
* Changed the recommended settings flow so applying recommendations no longer starts bulk optimization automatically.
* Cleaned up the remaining Plugin Check sanitization warning for admin result notices.

= 1.12.0 =
* Simplified admin navigation to Overview, Optimize, Formats, Bulk, SEO, Backups, and Advanced.
* Merged the settings summary into the Overview page.
* Added safe extension hooks for AVIF availability, bulk batch sizing, review URL, and after-optimization events.
* Added an in-plugin review request that only appears after real usage and no recent errors.

= 1.11.1 =
* Cleaned up Plugin Check findings for translator comments, read-only admin URL handling, AJAX input sanitization, file replacement, and the readme short description.

= 1.11.0 =
* Renamed internal public prefixes from the older short prefix to the safer `shrinkwell_`, `SHRINKWELL_`, and `shrinkwell-` patterns for WordPress.org review.
* Simplified the public plugin name to `Shrinkwell Image Optimizer`.
* Updated the WordPress.org contributor account to `levmedia123`.

= 1.10.0 =
* Added a launch readiness checklist and optimization proof overview.
* Stored delivery test and SEO scan results so site readiness is easier to review.
* Added a 5-image bulk test run for safer first use on client sites.
* Prevented WebP source files from being processed as duplicate WebP copies.
* Removed the dashboard widget from the first WordPress.org submission build to keep the admin footprint focused.

= 1.9.0 =
* Added smart bulk filters and an image SEO report for missing alt text and weak filenames.

= 1.8.0 =
* Rebranded the plugin to Shrinkwell, improved the bulk flow, and simplified Custom compression controls.

= 1.7.0 =
* Added a settings summary page and replaced the technical custom quality input with a 1-10 compression strength slider.

= 1.6.0 =
* Added an apply button for site scan recommendations and quick follow-up links.

= 1.5.0 =
* Improved compression explanations, clarified WebP/AVIF settings, added recommendation markers, and added a site recommendation scan.

= 1.4.0 =
* Added a backup manager tab with backup storage stats, per-image restore links, and restore-all support.

= 1.3.0 =
* Added bulk logs, WebP/AVIF delivery test, and a WordPress dashboard widget.

= 1.2.0 =
* Added tabbed settings pages, compression profiles, AVIF creation/serving, EXIF removal option, thumbnail optimization control, status checks, and improved bulk progress.

= 1.1.0 =
* Added frontend WebP serving with picture/source fallback.

= 1.0.0 =
* Initial version.
