mohsinqk/ai-filemetadata
Composer 安装命令:
composer require mohsinqk/ai-filemetadata
包简介
Automatically generates FAL metadata for files by means of public LLMs (Fork with custom changes)
关键字:
README 文档
README
Automatically generates FAL metadata (alternative texts, for the time being) for files by means of public LLMs.
This extension helps you to automate the process of generating such alternative texts for images. It serves as a preparation for EU Directive 2019/882 on the accessibility requirements for products and services (German: Barrierefreiheitsstärkungsgesetz (BFSG)).
The extension generates descriptive text for images, making them accessible to visually impaired individuals, e.g. when using screen reader software. It is not intended to create SEO-related texts.
ai_filemetadata.mp4
Video about this extension (in German) is available on Youtube: https://www.youtube.com/watch?v=3nMkxx2E4CE
Important
This extension is processing images from your TYPO3 installation via external AI services. You should check your privacy and data protection policies if the usage of the services for the image data is allowed! Please keep an eye on the license terms of your images, too, as some of them might be restricted from certain applications such as the use of LLM or AI technology.
Prerequisites
- TYPO3 >= v12
- PHP >= 8.2
- OpenAI API key (not to be confused with "ChatGPT Teams" or "ChatGPT Enterprise")
Installation
composer require mfd/ai-filemetadata
Configuration
Acquire the OpenAI API key from Open-AI and place the key in extension configuration. Model for openAI gpt-4o-mini but can be changed to any other modell which supports imageprocessing.
Alternatively setup AI hosting in the mittwald cloud and add the AI Base URL (API) to the configuration and select an active modell
Custom AI Prompt
You can customize the prompt sent to the AI model to generate alternative texts. This allows you to tailor the output to your specific needs or language requirements.
The prompt can be configured in the extension configuration under Alt Text Prompt. The default prompt is:
Create an alternative text for this image to be used on websites for visually impaired people who cannot see the image.
Focus on the image's main content and ignore all elements in the image not relevant to understand its message.
The text should not exceed 50 words.
To customize the prompt:
- Go to Admin Tools > Settings > Extension Configuration
- Select ai_filemetadata
- Modify the Alt Text Prompt field
- Use
\nfor line breaks in your custom prompt
Note: The extension automatically appends language-specific instructions when processing images in different languages based on your language mapping configuration.
Language Mapping
Since folder do not have a relation to any of the sites default languages you might want to define a mapping for certain folders of your storages. You can do so by add this to your system/settings.php:
'EXTCONF' => [ 'ai_filemetadata' => [ 'falLanguageMappings' => [ '1:/site-a/' => [0 => 'en_EN.utf-8', 1 => 'de_DE.utf-8'], '1:/site-b/' => [0 => 'fr_FR.utf-8', 2 => 'en_EN.utf-8'], '1:/site-c/' => [0 => 'de_CH.utf-8', 3 => 'it_CH.utf-8', 4 => 'fr_CH.utf-8'], ], ], ],
This defines the locales being used for each sys_language_uid per folder.
Exclude folders
To exclude certain folders you can use this in your system/settings.php:
'EXTCONF' => [ 'ai_filemetadata' => [ 'falExcludedPrefixes' => [ '1:/site-a/nudes/', ], ], ],
Resize images for LLM processing
Sending large images to OpenAI language models can consume an extremely large number of tokens leading to higher costs, see https://platform.openai.com/docs/guides/images-vision?api-mode=chat#calculating-costs. In most cases, an image size of no more than 512x512px is perfectly adequate for image analysis.
'EXTENSIONS' => [ 'ai_filemetadata' => [ 'imageResizing' => '512', ], ],
CLI command
bin/typo3 ai:generate-alt-texts --path="1:site-a/my-subfolder/" [--overwrite] [--limit=1]
This generates alt texts for all files within the given --path for all available languages. To avoid loading unnecessary translations you might want set a language mapping for certain folders. See chapter above.
Support
Free Support is available via Github Issue Tracker For commercial support, please contact us at info@marketing-factory.de
mohsinqk/ai-filemetadata 适用场景与选型建议
mohsinqk/ai-filemetadata 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 66 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「TYPO3 CMS」 「ai」 「fal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mohsinqk/ai-filemetadata 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mohsinqk/ai-filemetadata 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mohsinqk/ai-filemetadata 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
Supercharged text field validation.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
统计信息
- 总下载量: 66
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-01-20