=== Easydoor Media ===
Contributors: dooreasy
Tags: media, images, webp, avif, offload
Requires at least: 6.4
Tested up to: 7.1
Stable tag: 2.14.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Uploads go from the browser straight to Easydoor, which stores your media and serves it with optimized WebP and AVIF versions.

== Description ==

Easydoor Media moves your media library out of your hosting. When you upload a file in WordPress, it goes from your browser straight to Easydoor, an external media service, instead of to your server. Easydoor stores the original, creates the image sizes WordPress needs and serves everything from its own address. Your hosting's disk, bandwidth and upload time limits are no longer involved.

**This plugin needs an Easydoor account.** Easydoor is a paid service with a free plan. Nothing is sent anywhere until you paste your Easydoor license in the plugin. See the "External services" section below for exactly what is sent, and when.

What happens to each upload:

* The original file is stored as it came.
* Every image gets five WebP versions on upload, in the WordPress sizes: the 150×150 thumbnail (cropped), 300, 768, 1024 and 2560 pixels. Nothing is enlarged: a size bigger than the original is not created.
* An AVIF version of each size follows a few minutes later, without slowing the upload down.
* Large files are sent in pieces, so the size limit is Easydoor's, not your hosting's.

What stays the same:

* Every file is still a normal WordPress attachment, with its ID, title and sizes. Themes, page builders and blocks keep working with it.
* The Media Library, the media modal and the block editor upload as before. A line next to the title of the Media Library tells you that uploads go to Easydoor.
* You can still crop, rotate, flip and scale images with the WordPress image editor.
* Deleting an attachment in WordPress deletes it on Easydoor too.

Choosing the format your pages offer: under the Easydoor menu you pick a site default, **Automatic** (AVIF for browsers that open it, WebP for the others) or **WebP only**. In the block editor, the ⋮ menu of an Image block lets you choose for that image only.

Plans, as of this version:

* **Free**: 50 MB of space, one site, WebP and AVIF. No video.
* **Lite**: US$ 7 per month, 1 GB, unlimited sites, video included.
* **Medium**: US$ 15 per month, 5 GB, unlimited sites, video included.

The space counts everything Easydoor keeps for you, including the optimized versions. When it is full, only new uploads stop; what is already published stays online.

The plugin is available in English and Brazilian Portuguese.

== Installation ==

1. In WordPress, go to **Plugins → Add New**, search for "Easydoor Media", then install and activate it. You can also upload the ZIP file under **Plugins → Add New → Upload Plugin**.
2. Open the new **Easydoor** menu in the dashboard.
3. If you do not have an account yet, click **Create free account**. Confirm your e-mail address, activate the free account in the Easydoor panel and copy your license there.
4. Paste the license in the Easydoor screen and save. The plugin checks the license and registers this site's address in your account.
5. Upload a file in the Media Library. It now goes to Easydoor.

== Frequently Asked Questions ==

= Do I need an Easydoor account? =

Yes. The plugin is the WordPress side of the Easydoor service, and it does nothing until you paste a license. The free plan needs only a confirmed e-mail address.

= What happens to the media I already have? =

It stays where it is, in your hosting, and keeps working. Only new uploads go to Easydoor.

= Which files can I upload? =

Everything WordPress accepts, except HTML, HTM, JS, SVG and DFXP files. Images can be up to 300 MB and 100 megapixels; any other file, up to 2 GB. The free plan does not store video. Files that are not images are stored and served as they came.

= Can I get my files back into WordPress? =

Yes. In the Easydoor menu, **Bring my files back** downloads the originals and the WebP sizes into your uploads folder and changes the addresses in your posts back to your site. It only works while the plugin is active, so use it before deactivating the plugin. The AVIF versions do not come back.

= What happens if I deactivate the plugin? =

Images that are on Easydoor can stop showing in parts of your site, such as featured images and galleries, because WordPress no longer knows where they are. Use **Bring my files back** first.

= What happens if I cancel a paid plan? =

New uploads stop when the paid month ends, and everything you published stays online for 90 days. On day 90 the images stop being served, and on day 120 they are deleted. Until day 90 you can still use **Bring my files back**. The Easydoor screen shows these dates.

= Can other apps still upload to my media library? =

No, while a license is set. Files have to go from a browser to Easydoor, so uploads through the REST API (`POST /wp/v2/media`), XML-RPC and the old admin uploader are refused. Custom headers, backgrounds and the site icon set in the Customizer still go to your hosting.

= Where is the source of the upload script? =

The JavaScript upload client in `assets/vendor/easydoor-uploader.js` is not minified. It is generated from TypeScript with its comments kept, and its header says which version it is.

== External services ==

This plugin connects to **Easydoor** (https://easydoor.ai), a service that keeps and delivers media files, run by the plugin's author. The service is what the plugin is for: without it, uploads have nowhere to go.

**When.** Nothing is sent before you paste an Easydoor license in the plugin's screen. After that, the plugin talks to Easydoor only when you or your site use it, as described below.

**Where.**

* `https://api.easydoor.ai`, the Easydoor API, for everything below except image delivery.
* `https://*.easydoor.dev`, the Easydoor delivery addresses, where your published files are served from.

**What is sent, and when.**

* Your license, with every request your WordPress server makes to the API. It identifies your account. It never goes into your pages.
* When you save the license: the license you pasted (to check it) and your site's address (its home URL), which registers the site in your account.
* When someone in your dashboard uploads a file: your server asks the API for an upload permission that lasts five minutes, and the browser of that person sends the file itself (its content, name and size) to the API with that permission.
* After an upload: your server reads the file's details back from the API, and asks again for the AVIF versions a few minutes later.
* When you delete an attachment, or close a page in the middle of a large upload: a request to delete that file, or that unfinished upload, on Easydoor.
* When you edit an image: your server downloads the image from Easydoor, edits it and sends the result back.
* When you use **Bring my files back**: your server downloads your files from Easydoor.
* Once a day, and when you open the Easydoor screen: a request for your account's status, plan and used space.

**Your visitors.** The images and files you upload through the plugin are served from `*.easydoor.dev`. Your visitors' browsers load them from there, so Easydoor's delivery network receives those requests, like any website that serves images.

**Help e-mail.** The Help link opens an e-mail to Easydoor support in your own e-mail program, with the versions of the plugin, WordPress and PHP, your site's address and, when the plugin can read it from Easydoor, your plan. Your license is not included. It is only sent if you send it.

Easydoor terms of use: https://easydoor.ai/terms
Easydoor privacy policy: https://easydoor.ai/privacy

== Changelog ==

= 2.14.0 =
* First version for the WordPress.org plugin directory.
* Updates now come from WordPress.org. The plugin no longer asks Easydoor for new versions.
* The plugin and its upload script now declare their license, GPLv2 or later.
* When a subscription payment fails, the Easydoor screen and a one-line notice in the dashboard say so, with the date uploads stop and how to update the card.
* When Easydoor refuses uploads for the account (cancelled, blocked, payment failed or still being set up), the message now says why in the site's language, with the dates in the site's format.
* The cancellation notice no longer offers a way back to the free plan, which does not exist: a cancelled account stays cancelled even after deleting files.
* When Easydoor refuses the site's address or an upload, the message is now entirely in the site's language.

== Upgrade Notice ==

= 2.14.0 =
From this version on, updates come from WordPress.org.
