Search by

networkteam / neos-asset-ai-classification

networkteam

AI classification for assets in the classic Neos Media Browser

Package info

github.com/networkteam/Networkteam.Neos.AssetAiClassification

Type:neos-package

pkg:composer/networkteam/neos-asset-ai-classification

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-09-14 07:17 UTC

This package is auto-updated.

Last update: 2026-09-14 10:20:16 UTC


README

AI classification for local Neos Media assets in Neos Media Browser.

An asset is classified as Without AI, AI generated or AI modified. The classification is exclusive and belongs to the asset, so all uses and cropped image variants share it.

Installation

composer require networkteam/neos-asset-ai-classification
./flow doctrine:migrate
./flow flow:cache:flush

The migration covers the Doctrine MySQL 5.7 and MySQL 8 platforms, other database platforms need their own.

Usage

Fusion:

aiClassification = ${AssetAiClassification.getClassification(q(node).property('image'))}

aiGenerated = ${AssetAiClassification.isAiGenerated(q(node).property('image'))}

aiModified = ${AssetAiClassification.isAiModified(q(node).property('image'))}

Fluid:

{namespace ai=Networkteam\Neos\AssetAiClassification\ViewHelpers}
<ai:classification asset="{asset}" />

PHP, via Domain\Service\AssetAiClassificationService:

$service->getClassification($asset); // 'none' | 'generated' | 'modified'
$service->setClassification($asset, AssetAiClassification::AI_GENERATED);

All read methods accept an asset, an image variant or null. Writing emits Neos Media's assetUpdated signal, pass false as third argument to suppress it.

Supporting a new Neos version

Resources/Private/Templates/Asset/Edit.html is a copy of the Media Browser template and differs from it by a single f:render line. Diff it against the upstream template of the new Neos version and re-apply that line. That copy is what ties the package to a Neos version, not the PHP code — the neos/* constraints in composer.json have to match the Neos version the template was copied from.