=== LAFU Photon Media Optimizer ===
Contributors: lanetti
Tags: images, compression, performance, jpeg, webp
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Background image optimization with the Photon engine, backups, restore, and Media Offload integration.

== Description ==

LAFU Photon Media Optimizer queues image optimization in the background, prioritizes cloud processing when a Photon API key is present, and can fall back to local optimization on this server.

Without an API key, the Photon cloud engine is not called. Local compression can still run, and the admin shows a clear banner until you dismiss it or connect a key.

The WordPress plugin directory stays `lafu-media-optimizer` so existing sites keep their settings, queue, and per-image compression map.

== External services ==

When a Photon API key is configured, this plugin connects to the Photon compression API at https://photon.lanetti.fi (allowlisted; photon.lafu.fi is also accepted). Image bytes, the API key, and this site hostname are sent over HTTPS. Without an API key, no cloud calls are made.

Account service: when an administrator presses Connect under Media → Photon Optimizer, the plugin sends the email address they enter, this site address and the WordPress admin language to https://oma.lanetti.fi/api/photon/v1 to create a free key after the email link is confirmed. With a key saved, the plugin reads the plan and this month's usage from the same service (twice a day and when the settings page is open), and asks it for an upgrade link when an administrator presses Upgrade.

Service terms: https://lanetti.fi/legal/photon
Privacy policy: https://lanetti.fi/legal/privacy

== Installation ==

1. Keep the plugin folder named `lafu-media-optimizer`.
2. Activate LAFU Photon Media Optimizer in WordPress admin.
3. Open Media → Photon Optimizer, enter your email and press Connect. Click the link in the email and the plugin connects by itself. You can also paste an API key.

== Changelog ==

= 1.3.0 =
* Connect from the plugin: enter your email, confirm the link, and the key is saved for you. No copying.
* Plan and usage in the plugin, with one-click upgrade. The key stays the same after upgrading.
* Paid plans lift the local monthly cap automatically (the cap now follows the plan).
* Admin notice when the free monthly volume is used, with an upgrade button.

= 1.2.0 =
* Canonical Photon WordPress client: Media menu, local-only mode without cloud calls, dismissible banner, hosted OMA key support, engine host allowlist and secure remote args.
* Settings and Tools under Media → Photon Optimizer. Cleaner connection copy.

= 1.1.2 =
* Display name: LAFU Photon Media Optimizer (same slug, options, and meta).

= 1.1.1 =
* Plugin Check clean: wp_is_writable, readme Tested up to 7.1, five tags max.

= 1.1.0 =
* Display name: Photon Media Optimizer (same slug, options, and meta).

= 1.0.1 =
* Prior LAFU Media Optimizer release.
