=== EPA Imágenes WebP ===
Contributors: elpuntoazul
Tags: webp, images, performance, media
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Convert your whole media library to WebP, rewrite every reference and delete the old files. Run by hand, never automatically.

== Description ==

A one-off bulk converter for the media library. From **Media -> Convert to WebP**:

1. **Analyse.** Counts the convertible images (JPEG and PNG) and how much disk
   space they take today.
2. **Convert all.** For each image it creates the WebP version of the original
   file, regenerates every size registered by your theme, points the attachment
   at the new file, rewrites the old URLs in post content, metadata, options and
   the Yoast table, and deletes the old files.

Because the attachment keeps its ID, everything attached to it is preserved:
alt text, title, caption, description, featured images, galleries and Yoast
social data. If the WebP file ends up larger than the original (it happens with
some flat PNGs), the image is left untouched.

Conversion runs attachment by attachment from the browser, so a large library
does not hit the PHP time limit.

**Deleting the old files cannot be undone: make a backup first.** URLs change
their extension, so old addresses already indexed by Google Images will return
404 unless you add a redirect on the server.

= WP-CLI =

    wp epa-webp analizar
    wp epa-webp convertir --dry-run
    wp epa-webp convertir --limite=20
    wp epa-webp tema

= External services =

None. The plugin converts the files on your own server and does not send any
data anywhere.

== Installation ==

1. Upload the `epa-imagenes` folder to `/wp-content/plugins/` or install it from
   the Plugins screen.
2. Activate it.
3. **Make a full backup of the uploads folder and the database.**
4. Go to **Media -> Convert to WebP**, analyse first, then convert.

== Frequently Asked Questions ==

= Can I undo the conversion? =

No. The old files are deleted, so restore your backup if you need to go back.

= Does it need a special PHP extension? =

It needs GD or Imagick with WebP support, which is the default in current PHP
versions. The screen warns you if WebP support is missing.

= What happens to images already served as WebP? =

They are skipped. The `wp epa-webp tema` command also rewrites in the database
the URLs of theme images that are already served as WebP.

= Does it run on its own? =

No. Nothing is converted until you start it from the Media screen or from
WP-CLI.

== Changelog ==

= 1.0.1 =
* The whole admin interface is now translatable (text domain `epa-imagenes`), with a .pot template in `languages/`.
* Settings and the last run report are removed when the plugin is uninstalled.
* The readme is now in English, as required by the plugin directory.

= 1.0.0 =
* Initial release: manual media library conversion to WebP with reference rewriting.
