heidkaemper/statamic-import-image-metadata

Read EXIF and IPTC metadata when uploading an image to Statamic

1.2.0 2024-05-10 20:31 UTC

This package is auto-updated.

Last update: 2024-05-13 06:31:37 UTC


README

Banner

Statamic CMS - Metadata Import

Read EXIF and IPTC metadata when uploading an image to Statamic.

Installation

Require the addon as a Composer dependency.

composer require heidkaemper/statamic-import-image-metadata

Add a new field to your Asset Container Blueprint. A text field with the handle copyright would be a good start.

Import a JPG or TIFF image that contains metadata. 🎉

Configuration

The default configuration imports metadata for title, copyright and source if the corresponding fields exist in the blueprint.

To change this, you can publish the configuration.

php artisan vendor:publish --tag="import-image-metadata-config"

Have a look at the configuration file for details.

Metadata tags

Most common EXIF and IPTC tags should be available. Check these resources:

A specialty of iptcparse in PHP is that the IPTC tags are addressed via the code and are therefore not very human readable. For example, 2#116 would be the copyright field.

To make the configuration a little easier, this plugin maps the most important IPTC tags to more readable titles. However, the IPTC codes work too.

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d342e302b2d4646323639453f7374796c653d666f722d7468652d6261646765 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686569646b61656d7065722f73746174616d69632d696d706f72742d696d6167652d6d657461646174613f7374796c653d666f722d7468652d6261646765