Download the PHP package mohsinqk/ai-filemetadata without Composer

On this page you can find all versions of the php package mohsinqk/ai-filemetadata. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-filemetadata

ai_filemetadata

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.

https://github.com/user-attachments/assets/b0a632f1-0ca3-412b-9885-8dd4778308dd

Video about this extension (in German) is available on Youtube: https://www.youtube.com/watch?v=3nMkxx2E4CE

Read more

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

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:

To customize the prompt:

  1. Go to Admin Tools > Settings > Extension Configuration
  2. Select ai_filemetadata
  3. Modify the Alt Text Prompt field
  4. Use \n for 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:

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:

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.

CLI command

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 [email protected]


All versions of ai-filemetadata with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-intl Version *
openai-php/client Version ^v0.10.1
typo3/cms-core Version ^12 || ^13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mohsinqk/ai-filemetadata contains the following files

Loading the files please wait ...