=== IOO - Image Offload & Optimize ===
Contributors: wpcrafters
Tags: image optimization, webp, avif, cdn, media offload
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Server-side WebP and AVIF conversion with hosted storage and fast CDN delivery for WordPress images.

== Description ==

**Image Offload & Optimize** is a complete media infrastructure layer for WordPress — handling storage, optimization, and delivery in one plugin.

Most image plugins do one thing. You need three plugins to offload images, convert to WebP, and serve via CDN. Image Offload & Optimize does all three.

= Why Image Offload & Optimize? =

* **Hosted image storage** — no storage provider account or credentials to configure
* **Server-side WebP and AVIF conversion** — no separate optimization plugin needed
* **Designed for shared hosting** — image conversion runs on hosted servers instead of your WordPress host
* **Gutenberg compatible** — images in blocks are rewritten correctly
* **One plugin instead of three** — offload + optimize + deliver in one place

= How It Works =

1. Enter your API key in Settings
2. Connect your site to the hosted service
3. Upload images as normal — the service converts them to WebP (and AVIF on paid plans) and stores the results
4. Frontend images are delivered through the CDN using picture tags, with AVIF and WebP sources

= Gutenberg Compatible =

Image Offload & Optimize rewrites image URLs inside all core Gutenberg blocks — core/image, core/gallery, core/media-text, core/cover. Images are delivered through the hosted CDN with no extra storage configuration needed.

= Links =

* [Website](https://imageoffload.com)
* [Documentation](https://imageoffload.com/docs)
* [Contact](https://imageoffload.com/contact)

== External Services ==

This plugin relies on a service operated by WPCrafters (Tharwa Consulting Private Limited) to convert, store and deliver your images. The plugin cannot process images without it.

= Image processing API (api.imageoffload.com) =

When you upload an image to your media library, the plugin sends the image's public URL to this service. The service fetches the image from that URL, converts it to WebP (and AVIF on paid plans), stores the result, and returns URLs that your site then uses.

Data sent, and when:
- POST /api/convert on media upload and during bulk migration: the public URL of the image, its attachment ID, the names and dimensions of the image sizes registered on your site, your site domain, your API key
- GET /api/usage to display quota in the admin: site domain, API key
- POST /api/register-domain when you connect your site: site domain, API key
- DELETE /api/storage/{key} when you delete a media item: the storage key, site domain, API key
- GET /api/account to check plan status: site domain, API key

Requests to /api/convert, /api/usage and /api/storage also carry a short-lived licence token in the Authorization header once your site is connected. The plugin does not upload image files; the service retrieves each image from the URL it is given, so images must be publicly reachable.

The service address is https://api.imageoffload.com. A developer may override it with the WPCIOO_API_URL constant; the plugin does not expose this as a user setting.

Terms: https://imageoffload.com/terms
Privacy: https://imageoffload.com/privacy-policy

= Image delivery CDN (cdn.imageoffload.com) =

Once an image is offloaded, your pages reference it at this domain, so visitors' browsers request images from it. Paid plans may use a custom domain set by the site owner instead.

Terms: https://imageoffload.com/terms
Privacy: https://imageoffload.com/privacy-policy

== Privacy ==

Image URLs, attachment IDs, registered image size dimensions and your site domain are transmitted to the service described above so it can retrieve, convert, store and deliver your images.

Privacy: https://imageoffload.com/privacy-policy


== Installation ==

1. Upload the plugin files to `/wp-content/plugins/ioo-image-offload-optimize/` or install via the WordPress plugin screen
2. Activate the plugin through the Plugins screen in WordPress
3. Go to **Image Offload** in the admin sidebar
4. Enter your API key in Settings
5. Connect your site to the hosted service
6. Upload an image — it will be converted server-side, stored and delivered through the CDN

= Requirements =

* PHP 7.4 or higher
* An Image Offload account and API key

== Frequently Asked Questions ==

= Does this work on shared hosting? =

Yes. Image conversion runs on hosted servers, so no image conversion software is required on your WordPress host.

= Will my existing images be offloaded? =

New uploads are offloaded automatically. Existing images can be offloaded using the bulk migration tool in the plugin admin.

= Does the plugin delete my local image files? =

No. Your local files are left in place. The plugin sends the image's URL to the hosted service, which fetches and converts it and stores the result; your image URLs are then rewritten to serve from the CDN. Nothing is removed from your server. On paid plans your original image is also backed up to the hosted service.
= Does it work with Gutenberg? =

Yes. All core image blocks are supported — core/image, core/gallery, core/media-text, and core/cover. URLs in blocks are rewritten for CDN delivery.

= Does it work with WooCommerce? =

WooCommerce product images use standard WordPress attachments and are handled by the same URL rewriting.

= What happens if the hosted service is unavailable? =

If an image has not been offloaded, or offloading failed, the original local URL is used. Once an image is offloaded, the picture markup serves AVIF where supported and WebP otherwise, both from the CDN. This does not guarantee delivery during a service or CDN outage.

= How is my API key used? =

Your API key is stored in the WordPress database and is sent to the hosted service to authenticate API requests. Protect access to your WordPress admin and database.

= What happens if I edit or regenerate an image after it is offloaded? =

The offloaded copy is not updated automatically. Editing an image in the WordPress image editor, or regenerating thumbnails, changes the local files only. To refresh the hosted copy, delete the attachment and upload it again.

== Screenshots ==

1. Get Started — guided setup connects the hosted service in a few steps
2. Dashboard — image counts, storage used, and connection status
3. Settings — connect the hosted service with your API key
4. Bulk migration — offload existing media library images in the background
5. Image log — every processed image with its hosted CDN URL and format

== Changelog ==

= 1.1.8 =
* Bulk migration now runs on the server and continues after you close your browser
* Bulk migration moved to its own screen under the Image Offload menu
* Added a scheduled fallback so an interrupted migration resumes on its own
* Fixed migration not being marked complete after the final batch
* Removed unused browser-driven migration code

= 1.1.7 =
* Server-side WebP and AVIF conversion
* Hosted storage and CDN delivery
* Bulk migration for existing images
* Single endpoint resolution

= 1.0.1 =
* WordPress.org compliance fixes

= 0.1.0 =
* Initial release
* Hosted image storage and CDN delivery
* Server-side WebP conversion on upload
* Gutenberg block compatibility
* Full image size support with srcset
* Media library status badges
* Dashboard with storage stats

== Upgrade Notice ==

= 1.1.8 =
Bulk migration now runs server-side and keeps going after you close your browser.

= 1.1.7 =
Adds server-side WebP and AVIF conversion, hosted storage and CDN delivery, bulk migration for existing images, and single endpoint resolution.

= 1.0.1 =
WordPress.org compliance release.

= 0.1.0 =
Initial release of Image Offload & Optimize.
