=== Image Meta ===
Contributors: robfelty
Donate link: https://blog.robfelty.com/plugins
Plugin URI: https://blog.robfelty.com/plugins/image-meta
Tags: image, images, meta, alt text, iptc
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Fill in image title, caption, description, and alt text on upload from the
filename or IPTC/XMP caption. This works well with photo editing software such
as the Apple Photos application. If you add titles or captions in the Photos
app and then export the files, when you upload them to WordPress, the captions
will also automatically be imported, when inserted either as an image or a
gallery. 

== Description ==

When you upload an image, Image Meta fills in attachment fields based on your settings. You can set each of the following from the file name, IPTC/XMP caption, or leave it blank:

* Title
* Caption
* Description
* Alt text (from title, caption, description, or blank)

Modern cameras and editors often store captions in XMP (`dc:title` / `dc:description`) rather than classic IPTC. This plugin reads both.

Configure the plugin under Settings → Image Meta.

== Installation ==

1. Upload the `image-meta` folder to `/wp-content/plugins/`, or install through the Plugins screen.
2. Activate the plugin through the Plugins screen.
3. Go to Settings → Image Meta and choose how each field should be filled.

== Frequently Asked Questions ==

= Does this change existing images? =

No. It applies when new images are uploaded (or when attachment metadata is regenerated).

= Why wasn't my caption imported? =

WordPress core only reads classic IPTC (APP13) and some EXIF fields. Many apps write XMP instead. Image Meta reads XMP title/description as well.

== Changelog ==


= 1.0.0 =
* Read XMP metadata (dc:title, dc:description, etc.) when classic IPTC is missing
* Modernize for current WordPress coding standards and PHP 7.4+
* Use a class-based structure with the Settings API and option sanitization
* Escape all admin output; replace `extract()` and numeric capabilities
* Set alt text on upload instead of overriding attachment edit fields
* Require WordPress 5.8+ and PHP 7.4+

= 0.2 =
* Added default settings

= 0.1 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Reads XMP captions used by modern photo software when IPTC APP13 is absent.
