# WPSQR Media Protector

**Tags:** restrict deletion, media, delete, usage  
**Requires at least:** 5.2  
**Tested up to:** 6.8  
**Requires PHP:** 7.2  
**Stable tag:** 1.0.1  
**License:** GPLv2  
**License URI:** [GPLv2 License](https://www.gnu.org/licenses/gpl-2.0.html)

## Description

WPSQR Media Protector is a powerful WordPress plugin designed to prevent the deletion of images that are in use across your website.

**Key Features:**

- **Reports:** View reports on the plugin's page showing how many images have been checked, how many are pending, and estimated processing time for pending images.
- **Start Processing:** Analyze the usage of all images on your site and identify the posts, categories, or locations where they are utilized.
- **Cancel Processing:** Easily cancel ongoing processes at any time.
- **Versatility:** Supports various post types, including custom post types.
- **Compatibility:** Fully compatible with WordPress 5.2 and above, ensuring smooth operation with the latest releases.
- **Localization:** Includes language files for easy translation.

## Installation

1. Upload the `wpsqr-media-protector` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin from the 'Plugins' menu in WordPress.
3. Process all images for usage from the plugin's page.

## Frequently Asked Questions

### Can I check if images are used in different post types?
Yes, Media Protector supports custom post types, allowing you to check image usage across all post types on your site.

### How does Media Protector determine if an image is in use?
Media Protector analyzes your website's content and identifies where each image is being used, including in posts, pages, terms, tags, and custom post types.

### How long does it take to process images on my site?
Processing time depends on the number of images and the complexity of your site. The plugin will display an estimated processing time on the plugin page. Larger sites with thousands of images may take longer, but you can always cancel the processing if needed.

### What happens if I delete an image that’s in use?
Media Protector prevents the deletion of images that are currently in use. If you attempt to delete an image that is in use, the plugin will show a warning and will not allow the deletion unless the image is no longer referenced anywhere on your site.

### Can I cancel the processing of image usage at any time?
Yes, you can cancel the image processing at any time by clicking the "Cancel Processing" button on the plugin’s page. Any images that were not yet processed will remain pending for future processing.

### Will this plugin affect the performance of my website?
Media Protector is designed to run efficiently and should not negatively impact your site's performance. Processing images may take time, but it only occurs during the analysis phase. Once the processing is complete, it will not affect the speed or performance of your site.

### Does the plugin work with WooCommerce images?
Yes, Media Protector supports WooCommerce images, including product images, category images, and any other media associated with your store. It will analyze and protect all images used within your WooCommerce store.

### Can Media Protector handle large image libraries?
Yes, Media Protector is optimized to work with large image libraries. However, processing may take longer depending on the number of images on your site. You can track the progress through the plugin interface.

### Is Media Protector compatible with image optimization plugins?
Yes, Media Protector works alongside image optimization plugins like WP Smush or EWWW Image Optimizer. However, if you encounter any issues, we recommend testing the plugin with optimizers disabled to rule out potential conflicts.

### Does the plugin work with custom fields or third-party plugins?
Yes, Media Protector scans standard WordPress fields as well as custom fields created by third-party plugins. However, compatibility may depend on how other plugins store their data.

### Can Media Protector work with multisite WordPress installations?
Yes, Media Protector is fully compatible with WordPress multisite installations. Each site within the network can be managed independently.

### Is there documentation available?
Yes, you can find comprehensive documentation on our website at [WPSQR-Media-Protector Documentation](https://www.wp-sqr.com/).

## Changelog

### 1.0.1 
* Fixed small issues with plugin scripts.
* Improved user experience and compatibility.

### 1.0
* Initial release

## Upgrade Notice

### 1.0
- Initial release of WPSQR Media Protector.

## Troubleshooting

1. Ensure the WPSQR Media Protector plugin is activated and that your WordPress version is at least 5.2.
2. Deactivate other plugins to identify any conflicts.
