=== Image Guardian - Repair & Optimise ===
Contributors: sillygooseco
Tags: images, broken images, media, webp, image optimization
Requires at least: 7.1.3
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Scan WordPress image references, repair missing media, review duplicate files, and compare image optimisation options from the dashboard.

== Description ==

Image Guardian provides an administrator-only dashboard for finding and addressing common image maintenance issues.

Features include:

* Scan image URLs in standard post content and scan local WordPress Media Library attachments.
* Replace detected broken image URLs in their associated post or page by selecting an existing Media Library image.
* Restore missing local image attachment files using a working image.
* Review file format, dimensions and filesize for local attachments.
* Detect exact duplicate files using SHA-256 and require confirmation before attempting duplicate deletion.
* Attempt image compression and compare with WebP when supported by the server image editor.
* Enable WebP delivery for supported WordPress-generated image URLs and restore original delivery.
* Review item states and scan progress from one dashboard.

**Important:** The scanner focuses on standard WordPress content and local media. It does not comprehensively inspect all CSS backgrounds, JavaScript-rendered assets, page-builder storage, or externally hosted image libraries. WebP rewriting may not affect all builder/CDN outputs. Some image processing features require GD or Imagick support.

Always back up your database and uploads before changing image files or deleting attachments. Test on staging before production use.

== Installation ==

1. In WordPress, open Plugins > Add New > Upload Plugin.
2. Upload the Image Guardian plugin ZIP and activate it.
3. Open Image Guardian from the administrator menu.
4. Select "Scan site" to scan supported content and local attachments.
5. Review detected items and select an appropriate repair or optimisation action.
6. Confirm any deletion only after independently checking that the image is not in use.

== Frequently Asked Questions ==

= Does Image Guardian fix all images used by page builders? =

No. Standard post-content URLs and local Media Library files are the primary scan targets. Dynamically generated builder content, CSS backgrounds and CDN URLs can require separate inspection.

= Will WebP conversion delete the original file? =

The WebP delivery option retains originals. Native compression may change the original file after saving a backup; maintain a full-site backup independently.

= Why does an image remain large after optimisation? =

A safe conversion is not guaranteed to reduce every image. The optimiser may preserve the existing image when the candidates offer no improvement.

= Can I delete duplicates automatically? =

No. Deletion requires explicit confirmation and the plugin blocks deletion when supported reference checks find the attachment in use. Reference detection is not exhaustive.

= How do I replace a broken image? =

Open the broken-image item and choose a working replacement from the WordPress Media Library. The plugin updates detected matching URLs in the associated post content.

== Screenshots ==

1. Image issue row in the administrator dashboard showing the thumbnail, reported MIME type, dimensions, filesize and image maintenance actions. Captured from a development site.

== Changelog ==

= 1.0.0 =
* Refresh saved issue data and dashboard display after successful repair or image operations.
* Retain broken-image scanning, duplicate review, optimisation and WebP delivery tools.
* Dashboard state-refresh improvements. Back up the site and test on staging before updating.
