PHPackages                             balotias/statamic-asset-metadata-importer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. balotias/statamic-asset-metadata-importer

ActiveLibrary[Image &amp; Media](/categories/media)

balotias/statamic-asset-metadata-importer
=========================================

Automatically import and map EXIF/IPTC metadata from images to your Statamic asset fields on upload

v1.1.0(3mo ago)211MITPHPPHP ^8.2CI passing

Since Jan 8Pushed 3mo agoCompare

[ Source](https://github.com/BALOTIAS/statamic-asset-metadata-importer)[ Packagist](https://packagist.org/packages/balotias/statamic-asset-metadata-importer)[ Docs](https://github.com/balotias/statamic-asset-metadata-importer)[ RSS](/packages/balotias-statamic-asset-metadata-importer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Statamic Asset Metadata Importer
================================

[](#statamic-asset-metadata-importer)

[![Latest Version](https://camo.githubusercontent.com/64323c5cd1f6e4e79a88baa1dc46f93d8aa260ca2eb2ee434ddba5d4c10f9a22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62616c6f746961732f73746174616d69632d61737365742d6d657461646174612d696d706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/balotias/statamic-asset-metadata-importer) [![Total Downloads](https://camo.githubusercontent.com/6f8eeb144b89ae4cf29eb1ee8d1dd15c4e697c2603f7be1f2fea53198fc2202a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62616c6f746961732f73746174616d69632d61737365742d6d657461646174612d696d706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/balotias/statamic-asset-metadata-importer) [![License](https://camo.githubusercontent.com/fe73d954f657eccdf11a8298d2b2cd58b4d12ed0099f5e4b6944e4da563e411b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f62616c6f746961732f73746174616d69632d61737365742d6d657461646174612d696d706f727465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/balotias/statamic-asset-metadata-importer) [![Statamic](https://camo.githubusercontent.com/78716f1b67eb990ce1666239a59d9bc98675ad43f8216a260320cc8e36a5a0e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352b5f2537435f362b2d4646323639453f7374796c653d666c61742d737175617265266c6f676f3d73746174616d6963)](https://statamic.com) [![Tests](https://github.com/BALOTIAS/statamic-asset-metadata-importer/workflows/Tests/badge.svg)](https://github.com/BALOTIAS/statamic-asset-metadata-importer/actions)

[![Statamic Asset Metadata Importer](./statamic-asset-metadata-importer.jpeg)](./statamic-asset-metadata-importer.jpeg)

> Automatically import and map EXIF/IPTC metadata from your media to your Statamic asset fields on upload.

📖 Overview
----------

[](#-overview)

This addon automatically extracts metadata from uploaded images, videos and any supported file types, mapping it to your asset fields. When you upload media with embedded metadata (copyright information, credits, descriptions, etc.), this addon reads that data and populates your asset fields accordingly—saving you time and maintaining consistency across your asset library.

**Perfect for photographers, content creators, and anyone managing large media libraries.**

✨ Features
----------

[](#-features)

- **Automatic metadata extraction** on asset upload and re-upload
- **Multiple adapter support** - Choose the right tool for each file type
- **Multiple adapter fallback** - Try multiple adapters sequentially for better coverage
- **Video file support** - Extract metadata from MP4, MOV, AVI, and more
- **Wildcard support** - Process all file types or use pattern matching
- **Flexible field mapping** - Map any asset field to metadata tags with fallback options
- **Loose mapping mode** - Partial matching for flexible extraction
- **Queue support** - Async processing for better performance
- **Local and cloud storage** - Works with S3, DigitalOcean Spaces, etc.
- **29,000+ metadata tags** - Comprehensive support via Exiftool

📋 Requirements
--------------

[](#-requirements)

- Statamic 5 or 6
- PHP 8.2 - 8.5
- (Optional) [Exiftool](https://exiftool.org/) for comprehensive format support ⭐ Recommended
- (Optional) [FFmpeg](https://ffmpeg.org/) for video file support
- (Optional) PHP Imagick extension

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require balotias/statamic-asset-metadata-importer
```

Publish the configuration:

```
php artisan vendor:publish --tag=statamic-asset-metadata-importer-config
```

🚀 Quick Start
-------------

[](#-quick-start)

1. **Configure field mappings** in `config/statamic/asset-metadata-importer.php`:

```
'fields' => [
    'alt' => 'title',
    'copyright' => ['copyright', 'XMP-photoshop:Copyright'],
    'credit' => ['credit', 'XMP-photoshop:Credit'],
],
```

2. **Set up your adapters** (optional, for best results):

```
'adapter_mapping' => [
    'native' => ['jpg', 'jpeg', 'tif', 'tiff'],
    'exiftool' => ['png', 'webp', 'avif'],      // Requires Exiftool
    'ffprobe' => ['mp4', 'mov', 'avi', 'mkv'],  // Requires FFmpeg
],
```

3. **Add fields to your asset blueprint:**

    - Navigate to Assets → Your Container → Blueprint
    - Add fields: `alt`, `copyright`, `credit`, etc.
4. **Upload your images!** Metadata will be extracted automatically.

📚 Documentation
---------------

[](#-documentation)

- **[Configuration Guide](docs/configuration.md)** - Complete configuration options
- **[Adapter System](docs/adapters.md)** - Understanding adapters and installation
- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions

🎯 Adapter System
----------------

[](#-adapter-system)

The addon supports multiple metadata extraction adapters:

AdapterFormatsBest ForRequirements**Native**JPG, TIFFCommon imagesNone (built-in)**Exiftool** ⭐[100+ formats](https://exiftool.org/#supported)Maximum coverage[Install Exiftool](docs/adapters.md#installing-exiftool)**FFprobe**[Video files](https://www.ffmpeg.org/ffprobe-all.html#File-Formats)Videos[Install FFmpeg](docs/adapters.md#installing-ffmpeg)**ImageMagick**[200+ formats](https://imagemagick.org/script/formats.php#supported)Additional formatsPHP Imagick extension> 💡 **Recommendation:** Install [Exiftool](https://exiftool.org/) for the best experience. It supports [29,000+ metadata tags](https://exiftool.org/TagNames/index.html) across virtually all image and video formats.

[Learn more about adapters →](docs/adapters.md)

⚙️ How It Works
---------------

[](#️-how-it-works)

1. **Asset Upload** - You upload an image or video to Statamic
2. **Metadata Extraction** - The addon reads embedded metadata using your configured adapter
3. **Field Mapping** - Metadata is mapped to asset fields based on your configuration
4. **Automatic Population** - Fields are populated automatically

Works seamlessly with both local storage and remote storage (S3, DigitalOcean Spaces, etc.).

💡 Example Use Case
------------------

[](#-example-use-case)

A photographer exports images from Lightroom with embedded metadata:

```
Image.jpg contains:
- Title: "Sunset over Mountains"
- Copyright: "© 2025 Jane Doe"
- Credit: "Jane Doe Photography"
- Description: "Beautiful sunset in the Alps"

```

After upload to Statamic, the asset fields are automatically populated:

```
alt: "Sunset over Mountains"
copyright: "© 2025 Jane Doe"
credit: "Jane Doe Photography"
description: "Beautiful sunset in the Alps"
```

No manual data entry required! 🎉

🔧 Configuration Examples
------------------------

[](#-configuration-examples)

### Basic Setup (Native Adapter)

[](#basic-setup-native-adapter)

```
'adapter_mapping' => [
    'native' => ['jpg', 'jpeg', 'tif', 'tiff'],
],
```

### Recommended Setup (with Exiftool)

[](#recommended-setup-with-exiftool)

```
'adapter_mapping' => [
    'exiftool' => ['*'], // Exiftool for everything
],
```

### Different Adapters Setup (All Media Types)

[](#different-adapters-setup-all-media-types)

```
'adapter_mapping' => [
    'native' => ['jpg', 'jpeg', 'tif', 'tiff'],
    'exiftool' => ['png', 'webp', 'avif', 'heic'],
    'ffprobe' => ['mp4', 'mov', 'avi', 'mkv'],
    'imagick' => ['gif', 'bmp'],
],
```

### Multiple Adapter Fallback (NEW)

[](#multiple-adapter-fallback-new)

```
'adapter_mapping' => [
    'native' => ['jpg'],    // Try native first (fast)
    'exiftool' => ['jpg'],  // Fallback to exiftool if no metadata
],
```

When multiple adapters are configured for the same extension, they are tried sequentially until metadata is found. This provides better coverage and fallback options.

[View full configuration guide →](docs/configuration.md)

🐛 Troubleshooting
-----------------

[](#-troubleshooting)

**No metadata imported?**

- Enable debug mode: `ASSET_METADATA_IMPORTER_DEBUG=true`
- Check logs at `storage/logs/laravel.log`
- Verify field handles match your blueprint

**File type not working?**

- PNG/WEBP/AVIF: Install [Exiftool](docs/adapters.md#installing-exiftool)
- Videos: Install [FFmpeg](docs/adapters.md#installing-ffmpeg)
- Check [adapter mapping](docs/adapters.md)

[Full troubleshooting guide →](docs/troubleshooting.md)

📄 License
---------

[](#-license)

MIT License - see [LICENSE.md](LICENSE.md)

🙏 Credits
---------

[](#-credits)

- Inspired by [heidkaemper/statamic-import-image-metadata](https://github.com/heidkaemper/statamic-import-image-metadata)
- Developed by [balotias](https://github.com/balotias)
- Powered by [lychee-org/php-exif](https://github.com/LycheeOrg/php-exif)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance81

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Total

2

Last Release

101d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3e094df7385311b24fd38d4ae9dc819681378fd051a79bbc535b7f2d89f3347?d=identicon)[BALOTIAS](/maintainers/BALOTIAS)

---

Top Contributors

[![BALOTIAS](https://avatars.githubusercontent.com/u/13562297?v=4)](https://github.com/BALOTIAS "BALOTIAS (16 commits)")

---

Tags

imagemetadataassetexifIPTCstatamicStatamic addonstatamic-cms

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/balotias-statamic-asset-metadata-importer/health.svg)

```
[![Health](https://phpackages.com/badges/balotias-statamic-asset-metadata-importer/health.svg)](https://phpackages.com/packages/balotias-statamic-asset-metadata-importer)
```

###  Alternatives

[spatie/image

Manipulate images with an expressive API

1.4k54.4M138](/packages/spatie-image)[frameright/image-metadata-parser

Image metadata parsing library

1133.9k](/packages/frameright-image-metadata-parser)[fileeye/pel

PHP Exif Library. A library for reading and writing Exif headers in JPEG and TIFF images using PHP.

197.1M2](/packages/fileeye-pel)[carlcs/craft-assetmetadata

Asset Metadata plugin for Craft CMS

316.8k](/packages/carlcs-craft-assetmetadata)[visuellverstehen/statamic-picturesque

A Statamic tag for building HTML-only responsive images.

1016.9k](/packages/visuellverstehen-statamic-picturesque)[daun/statamic-placeholders

Generate low-quality image placeholders for lazyloading Statamic assets

106.6k](/packages/daun-statamic-placeholders)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
