=== Media Background Remover ===
Contributors: fareeddaar, thefareeddaar
Tags: background remover, media library, image editing, remove background, ai images
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Remove image backgrounds directly from the WordPress Media Library using AI and create transparent PNG or WebP images without leaving WordPress.

== Description ==

Media Background Remover helps WordPress users remove image backgrounds directly from the Media Library.

Instead of downloading an image, editing it in another tool, and uploading it again, this plugin lets you process supported images from inside the WordPress dashboard.

This plugin is useful for:
* WooCommerce product images
* logos and graphics
* marketing assets
* agency workflows
* content creators and site managers

Current features:
* One-click background removal from the attachment edit page
* Live processing spinner while the image is being processed
* Preview the transparent result before saving
* Save to Media Library with a single click
* Processed images are clearly marked and won't show the remove button again
* Creates a new processed image without replacing the original
* Supports JPG, PNG, and WebP input files
* Outputs transparent PNG or WebP
* API key settings page
* Lightweight workflow focused on the WordPress admin

== External Services ==

This plugin connects to the remove.bg API to process images.

It sends the selected image file only when an administrator manually triggers the Remove Background action.

It sends this data to remove.bg:
* the image file selected for processing
* your requested output settings, such as format and size
* your remove.bg API key in the request header for authentication

Service provider: remove.bg
Service URL: https://www.remove.bg/
API documentation: https://www.remove.bg/api
Terms of service: https://www.remove.bg/tos
Privacy policy: https://www.remove.bg/privacy

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Go to Settings > Background Remover.
4. Enter your remove.bg API key.
5. Save settings.
6. Open Media > Library and click on any image.
7. Click "Remove Background" and wait for the result.
8. Click "Save to Media Library" to keep the transparent image.

== Frequently Asked Questions ==

= Does this replace my original image? =

No. The plugin creates a new processed image and keeps the original image untouched.

= Which image formats are supported? =

Supported input formats:
* JPG / JPEG
* PNG
* WebP

Supported output formats:
* PNG
* WebP

= Do I need an API key? =

Yes. A valid API key from remove.bg is required.

= Does it work in Grid View? =

The current release is optimized for Media Library List View and the attachment edit screen.

= Why is the output image smaller than the original? =

The free tier of remove.bg limits output to 0.25 megapixels (preview quality). Upgrade to a paid plan and set the size to "auto" in Settings > Background Remover to get full-resolution output.

== Screenshots ==

1. Plugin settings page — API key, output format, and size options
2. Attachment details with the Remove Background action button
3. Original image with link to latest processed transparent copy
4. Processed transparent image shown in the Media Library
5. Edit Media page for the saved transparent result

== Changelog ==

= 1.4.0 =
* Simplified UX: click → loader → preview → save. No options step.
* Two-step AJAX: preview first, save to library on confirmation
* Processed images are now clearly marked and won't show the remove button
* Processed image attachment page shows "This is a processed transparent image" with link to original
* Hover overlay button hidden on processed images
* Removed per-image options (size, format, thumbnail toggles) — uses saved settings
* Removed sizes table and per-size download from result popup
* Added retry button on error
* Save button shows inline saving state
* After saving, remove background buttons are hidden on the current page

= 1.3.0 =
* Added AJAX-powered modal for removing backgrounds on the attachment edit page
* Live spinner and progress feedback while the image is processing
* Result popup shows the processed image with all available dimensions
* Download individual sizes or the full-size transparent image directly
* Output size, format, and thumbnail generation options selectable per image
* Hover overlay button on the image preview for quick access
* Processed images now saved as filename-transparent.png (was -no-bg)
* Removed direct cURL usage; all API calls now use the WordPress HTTP API
* Added duplicate processing guard to prevent accidental double-clicks
* Expanded uninstall cleanup to remove all plugin post meta and transients
* API key field now uses a password input for visual security
* Fixed orphaned thumbnail files when size generation is disabled
* Removed deprecated load_plugin_textdomain call and nonexistent Domain Path header
* Updated Tested up to 7.0

= 1.2.3 =
* Removed Plugin URI to avoid duplicate URI review issues
* Added uninstall cleanup for plugin settings
* Added privacy policy helper content and clearer external service disclosure
* Tightened sanitization for request and settings values
* Added bundled admin stylesheet and updated readme metadata

= 1.2.1 =
* Updated plugin header and WordPress.org documentation
* Added duplicate-load protection in the main plugin file
* Added bundled admin stylesheet file
* Improved submission-readiness metadata

= 1.2.0 =
* Fixed activation stability issues
* Improved request handling
* Improved admin notices and settings behavior
* Improved plugin packaging safety

= 1.1.0 =
* Improved API request handling
* Improved settings persistence

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.4.0 =
Simplified one-click background removal: click, preview, save. No more options dialogs.

= 1.3.0 =
Major UX upgrade: AJAX modal with live processing, dimension picker, and per-image download.

= 1.2.3 =
Recommended update for plugin review and privacy disclosure improvements.

== Roadmap ==

* Grid View support
* batch background removal
* WooCommerce product image tools
* automatic processing on upload
* background color replacement
* better processing logs

== Author ==

TheFareedDaar
https://thefareeddaar.com/
