{"id":13650416,"url":"https://github.com/gbicou/directus-extension-imagga","last_synced_at":"2025-03-19T22:30:51.974Z","repository":{"id":152406785,"uuid":"625963121","full_name":"gbicou/directus-extension-imagga","owner":"gbicou","description":"Automatic image tagging of Directus files with Imagga API","archived":false,"fork":false,"pushed_at":"2024-03-22T10:14:33.000Z","size":670,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-23T11:08:36.512Z","etag":null,"topics":["auto-tagging","directus","directus-custom-hook","directus-extension","image","imagga","tag"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbicou.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-10T13:57:32.000Z","updated_at":"2024-04-14T16:58:53.665Z","dependencies_parsed_at":"2023-07-06T14:15:42.243Z","dependency_job_id":"6d99c7ef-dde2-4142-a533-702b81958d81","html_url":"https://github.com/gbicou/directus-extension-imagga","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbicou%2Fdirectus-extension-imagga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbicou%2Fdirectus-extension-imagga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbicou%2Fdirectus-extension-imagga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbicou%2Fdirectus-extension-imagga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbicou","download_url":"https://codeload.github.com/gbicou/directus-extension-imagga/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746199,"owners_count":20341203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-tagging","directus","directus-custom-hook","directus-extension","image","imagga","tag"],"created_at":"2024-08-02T02:00:36.629Z","updated_at":"2025-03-19T22:30:51.383Z","avatar_url":"https://github.com/gbicou.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":["Community"],"readme":"# Imagga for Directus\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n\nThis is a [Directus](https://directus.io/) hook for file uploads to automatically tag images with [Imagga API](https://imagga.com/).\n\n- npm package : `@bicou/directus-extension-imagga`\n- [✨ \u0026nbsp;Release Notes](/CHANGELOG.md)\n\n## Requirements\n\nThis extension requires Directus 10 or higher to be installed.\n\n## Installation\n\nAdd `@bicou/directus-extension-imagga` dependency to your directus project.\n\n```bash\n# Using pnpm\npnpm add @bicou/directus-extension-imagga\n# Using yarn\nyarn add @bicou/directus-extension-imagga\n# Using npm\nnpm install @bicou/directus-extension-imagga\n```\n\n## Usage\n\nConfigure the extension with environment variables (in a .env file for example) :\n\n### Authorization\n\nThe credentials are available in [your Imagga user dashboard](https://imagga.com/profile/dashboard).\n\n| Key             | Description                              |\n| --------------- | ---------------------------------------- |\n| `IMAGGA_KEY`    | Imagga API key on your user dashboard    |\n| `IMAGGA_SECRET` | Imagga API secret on your user dashboard |\n\n### Configuration\n\n#### Tags service\n\nAutomatically suggest textual tags from images.\n\n| Key                     | Description                                      | Default       |\n| ----------------------- | ------------------------------------------------ | ------------- |\n| `IMAGGA_TAGS_ENABLE`    | enables auto tagging                             | true          |\n| `IMAGGA_TAGS_LIMIT`     | limits the number of tags in the result          | -1 (no limit) |\n| `IMAGGA_TAGS_THRESHOLD` | thresholds the confidence of tags in the result  | 0.0           |\n| `IMAGGA_TAGS_LANGUAGE`  | get a translation of the tags in other languages | en            |\n\nPlease refer to [Imagga Tags API documentation](https://docs.imagga.com/#tags) for more information.\n\n#### Colors service\n\nAnalyse and extract the predominant colors from images.\n\n| Key                    | Description               | Default |\n| ---------------------- | ------------------------- | ------- |\n| `IMAGGA_COLORS_ENABLE` | enables colors extraction | false   |\n\nPlease refer to [Imagga Colors API documentation](https://docs.imagga.com/#colors) for more information.\n\n## Demo\n\nAn example of an image uploaded in the file library of Directus whose tags are automatically filled in :\n\n[Play screencast video](https://user-images.githubusercontent.com/174636/230939020-6f8871fb-ba9b-4ebf-bfc0-779b8c730741.webm)\n\n## Results\n\n### Tags\n\nThe result is stored as an array of strings in the `directus_files.tags` field.\n\n```json5\n{\n  \"tags\": [\"lake\", \"boathouse\", \"lakeside\", \"mountain\", \"shore\", /*...*/]\n}\n```\n\n### Colors\n\nThe result is stored under the `colors` key of the `directus_files.metadata` field.\n\n```json5\n{\n  \"colors\": {\n    \"background\": [\n      { \"r\": 25, \"g\": 40, \"b\": 36, \"html_code\": \"#192824\", \"percent\": 55.2785682678223 }, // ...\n    ],\n    \"foreground\": [\n      { \"r\": 92, \"g\": 88, \"b\": 92, \"html_code\": \"#5c585c\", \"percent\": 41.5135154724121 }, // ...\n    ],\n    \"image\": [\n      { \"r\": 24, \"g\": 36, \"b\": 34, \"html_code\": \"#182422\", \"percent\": 43.4364776611328 }, // ...\n    ]\n  }\n}\n```\n\n## License\n\nThis extension is released under the MIT license. See the LICENSE file for more details.\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@bicou/directus-extension-imagga/latest.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-version-href]: https://npmjs.com/package/@bicou/directus-extension-imagga\n[npm-downloads-src]: https://img.shields.io/npm/dm/@bicou/directus-extension-imagga.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-downloads-href]: https://npmjs.com/package/@bicou/directus-extension-imagga\n[license-src]: https://img.shields.io/npm/l/@bicou/directus-extension-imagga.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[license-href]: https://npmjs.com/package/@bicou/directus-extension-imagga\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbicou%2Fdirectus-extension-imagga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbicou%2Fdirectus-extension-imagga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbicou%2Fdirectus-extension-imagga/lists"}