Learn more about our ✨ new ✨ native MCP
Directus Logo
  • Use Cases and Features
    • Headless CMS
      Manage and deliver content with ease
    • Backend-as-a-Service
      Build and ship applications faster
    • Headless Commerce
      A single source of truth for products
    • 100+ More Use Cases
      Build anything (or everything)
    • Instant APIs
      Connect a database, get REST + GraphQL APIs
    • Granular Policy-Based Auth
      Provide secure, autonomous data access
    • Visual Automation Builder
      Automate content and data workflows with ease
    • 50+ More Features
      Get everything you need out-of-the-box
    Project Showcase
    Built With Directus

    Built With Directus

    See what everyone's been building with Directus

  • Learn More
    • Blog
      Read our latest articles and guides
    • Case Studies
      Case studies and success stories
    • Community
      Join our new community forum.
    • Agency Directory
      Browse our list of agency partners
    • About Us
      Learn more about Directus and the team
    • Wall of Love
      See what others are saying about us
    • Contact
      Have a general inquiry or question for us?
    • Support
      Reach out to Directus support
    Watch Directus TV
    Directus TV
    Video

    Directus TV

    Go down the rabbit hole with hours of original video content from our team.

  • Developers
  • Enterprise
  • Pricing
Book a DemoGet StartedLog In
GitHub logo33,618
Directus Marketplace
Marketplace
  1. Extensions
  2. Integrations
  3. Templates
Back to Extensions
hook

Imagga

Automatic image tagging of Directus files with Imagga API

Imagga for Directus

npm version npm downloads License

This is a Directus hook for file uploads to automatically tag images with Imagga API.

  • npm package : @bicou/directus-extension-imagga
  • ✨  Release Notes

Requirements

This extension requires Directus 10 or higher to be installed.

Installation

Add @bicou/directus-extension-imagga dependency to your directus project.

# Using pnpm
pnpm add @bicou/directus-extension-imagga
# Using yarn
yarn add @bicou/directus-extension-imagga
# Using npm
npm install @bicou/directus-extension-imagga

Usage

Configure the extension with environment variables (in a .env file for example) :

Authorization

The credentials are available in your Imagga user dashboard.

Key Description
IMAGGA_KEY Imagga API key on your user dashboard
IMAGGA_SECRET Imagga API secret on your user dashboard

Configuration

Tags service

Automatically suggest textual tags from images.

Key Description Default
IMAGGA_TAGS_ENABLE enables auto tagging true
IMAGGA_TAGS_LIMIT limits the number of tags in the result -1 (no limit)
IMAGGA_TAGS_THRESHOLD thresholds the confidence of tags in the result 0.0
IMAGGA_TAGS_LANGUAGE get a translation of the tags in other languages en

Please refer to Imagga Tags API documentation for more information.

Colors service

Analyse and extract the predominant colors from images.

Key Description Default
IMAGGA_COLORS_ENABLE enables colors extraction false

Please refer to Imagga Colors API documentation for more information.

Demo

An example of an image uploaded in the file library of Directus whose tags are automatically filled in :

Play screencast video

Results

Tags

The result is stored as an array of strings in the directus_files.tags field.

{
  "tags": ["lake", "boathouse", "lakeside", "mountain", "shore", /*...*/]
}

Colors

The result is stored under the colors key of the directus_files.metadata field.

{
  "colors": {
    "background": [
      { "r": 25, "g": 40, "b": 36, "html_code": "#192824", "percent": 55.2785682678223 }, // ...
    ],
    "foreground": [
      { "r": 92, "g": 88, "b": 92, "html_code": "#5c585c", "percent": 41.5135154724121 }, // ...
    ],
    "image": [
      { "r": 24, "g": 36, "b": 34, "html_code": "#182422", "percent": 43.4364776611328 }, // ...
    ]
  }
}

License

This extension is released under the MIT license. See the LICENSE file for more details.

@bicou/directus-extension-imagga

npm i @bicou/directus-extension-imagga
This extension is not sandboxed and can only be installed in self-hosted instances using npm. Learn more.
bicou
1.2.0
Works with v10.0.0+
Updated 7 months ago
MIT License
10.3 KiB (4 files)
npm
Repository
Report Issue
  • Directus LogoDirectus Logo

    A composable backend to build your Headless CMS, BaaS, and more. 

  • Solutions
    • Headless CMS
    • Backend-as-a-Service
    • Product Information
    • 100+ Things to Build
  • Resources
    • Documentation
    • Guides
    • Community
    • Release Notes
  • Support
    • Issue Tracker
    • Feature Requests
    • Community Chat
    • Cloud Dashboard
  • Organization
    • About
    • Careers
    • Brand Assets
    • Contact
©2025 Monospace Inc
  • Cloud Policies
  • License
  • Terms
  • Privacy