heidkaemper / statamic-import-image-metadata
Read EXIF and IPTC metadata when uploading an image to Statamic
Installs: 3 154
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 2
Open Issues: 2
Type:statamic-addon
Requires
- statamic/cms: ^4.0 || ^5.0
Requires (Dev)
- laravel/pint: ^1.15
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.34
README
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.