In PrestaShop you add the widget as an external script in the theme.yml of a child theme (server: remote) or in a module with registerJavascript().
Mark product images through the image caption, if your theme outputs it as alt text, ending in “(AI-generated)”. PrestaShop does not reliably keep the file name of product images in the image address.
Add the script tag
<script src="https://www.ai-label.app/widget.js" defer></script>
Your changes belong in a child theme, so that updates of the parent theme do not overwrite them. PrestaShop registers external scripts in theme.yml under assets, according to the documentation with server: remote for addresses outside the shop. In theme.yml the loading key is attribute (singular):
assets:
js:
all:
- id: ai-label-widget
path: https://www.ai-label.app/widget.js
server: remote
attribute: defer
priority: 200
In the child theme, keep the parent theme's assets as described in the child theme guide. In a module, the same entry uses registerJavascript() with the options 'server' => 'remote', 'position' => 'head' and 'attributes' => 'defer'.
Mark images
Which images need a label is your decision, for example with the labelling check. The widget only labels marked images, in three ways that can be combined:
- Attribute on the image:
data-ai-label="generated"for images created entirely with AI,data-ai-label="modified"for photos edited with AI. - File name with a marker before the extension:
vase--ai.jpgorvase--ai-mod.jpg. - Alt text ending in “(AI-generated)” or “(AI-modified)”.
In PrestaShop, mark images through the caption of the product image, which you maintain for each image in the product. Many themes output it as alt text, and then the suffix at the end is enough. The alt attribute in the page source shows whether your theme does this.
The file name does not suit product images, because PrestaShop stores them under its own numbers. The original name therefore usually does not appear in the image address. In child theme templates, set the data-ai-label attribute directly.
Pitfalls
- Two spellings:
theme.ymlusesattribute, PHP usesattributes. A typo loads the script withoutdefer. - Cache and combined files: after editing
theme.yml, the shop often still serves the old version. Clear the cache. - Several languages: captions exist per language. Add the suffix in every shop language.
- Enlarged view: check that the label appears in the window with the large product image.
Limits of the widget
- The widget only reaches
<img>elements on pages with the script. Background images from the stylesheet and images under 48 pixels (adjustable withdata-min) stay unlabelled. - Check whether the script runs in cart and checkout and the images there are large enough.
- It cannot reach emails such as order confirmations. For images outside your website, create a copy with the label burned in using Label an AI image.
- Privacy: when the script loads from ai-label.app, our host sees the IP address, as with any request. The script sets no cookies. Mention it in your privacy policy.
Native app
A dedicated PrestaShop app is planned. There is no date yet.
Get notified when the PrestaShop app launches
We will email you once when the app launches.
Frequently asked questions
Why does the file name not work for product images?
PrestaShop stores product images under its own numbers, so the uploaded name usually does not appear in the image address. Use the caption as alt text.
Does this apply to PrestaShop 8 and 9?
The documentation describes theme.yml and registerJavascript() for version 9. For older themes, check the documentation of your version.
Sources
Para. refers to the paragraph number in the European Commission's guidelines on Article 50, C(2026) 5054.
- PrestaShop DevDocs: asset management (9)PrestaShop Project · Platform · 23 Jun 2026
- PrestaShop DevDocs: child theme (9)PrestaShop Project · Platform · 21 May 2026
- PrestaShop user guide: managing products (8)PrestaShop Project · Platform · 11 Oct 2026
- Code of Practice on Transparency of AI-Generated Content (final version)Europäische Kommission · Code of practice · 10 Jun 2026
- Regulation (EU) 2024/1689 (AI Act)EUR-Lex · Law · 12 Jul 2024


