Skip to content
EN
Free: label AI images right in your browser. No upload, no sign-up for your first 3 images.Label now
AI-LabelAI images, EU AI Act
Integrations · WordPressUpdated 11 October 20263 min read9 primary sources

Labelling AI images in WordPress

For blogs, magazines and company sites on WordPress: the free widget adds the AI label required by Article 50 of the EU AI Act to marked images.

In short

In WordPress you add the widget once for the whole site: with the WPCode plugin or in a child theme with wp_enqueue_script(). Mark images through the alt text in the media library or the image block.

A file name with --ai does not work, because WordPress collapses double hyphens on upload. For shops there is a separate WooCommerce guide.

Add the script tag

<script src="https://www.ai-label.app/widget.js" defer></script>

The script tag belongs once in the head of every page, not in single posts. The simplest way is the WPCode plugin: “Code Snippets” menu, header field (“Scripts in Header”), save. If you maintain your own theme, load the script in a child theme with the defer strategy:

add_action( 'wp_enqueue_scripts', function () {
    wp_enqueue_script( 'ai-label', 'https://www.ai-label.app/widget.js', array(), null, array( 'strategy' => 'defer' ) );
} );

A script tag in a Custom HTML block only works on that one page. Only roles with the unfiltered_html capability may save such scripts: administrators and editors on a single site, only super admins on a network. It is the wrong place for a site-wide script.

Mark images

The widget only labels images you have marked. Whether an image needs a label is your call, for example with the labelling check. Three ways, which can be combined:

The simplest way in WordPress is alt text. In the media library, open an image's details and add “(AI-generated)” or “(AI-modified)” to the alternative text. In the block editor, the same field is in the image block settings. Featured images take their alt text from the media library.

The file name does not work. On upload, sanitize_file_name() collapses several hyphens into one. vase--ai.jpg becomes vase-ai.jpg, and the marker is gone. The data-ai-label attribute is only worth it in theme templates.

Pitfalls

Limits of the widget

Native app

A dedicated WordPress app is planned. There is no date yet. Until then, the widget works without installing anything in the system. If you like, we will write to you once at launch.

Get notified when the WordPress app launches

A short email is enough. We will write once at launch, nothing else.

Frequently asked questions

Can I paste the script tag into a post?

It then only works on that page, and only roles with unfiltered_html may save it. Add it site-wide with WPCode or in a child theme.

Why does an older post have no label?

The image block stored the alt text when it was inserted. A later change in the media library does not reach it. Add the suffix in the block.

Why does the widget not recognise my file name?

On upload, WordPress turns --ai into -ai. Use the alt text.

Is there a WordPress plugin?

A WordPress app is planned. Use the button on this page to be notified once at launch.

Sources

All sources read in full. Paragraph numbers (para.) refer to the European Commission's guidelines on Article 50, C(2026) 5054.

  1. WPCode in the WordPress plugin directoryWordPress.org · Platform · 8 Oct 2026
  2. WordPress Developer Resources: wp_enqueue_script()WordPress.org · Platform · 11 Oct 2026
  3. WordPress Theme Handbook: child themesWordPress.org · Platform · 26 Jan 2024
  4. WordPress documentation: Media Library screenWordPress.org · Platform · 6 Jun 2024
  5. WordPress source code: sanitize_file_name() (version 7.1.3)WordPress · Platform · 11 Oct 2026
  6. WordPress documentation: Roles and capabilitiesWordPress.org · Platform · 2 Sept 2026
  7. WP Rocket: Delay JavaScript executionWP Media · Platform · 11 Mar 2026
  8. Code of Practice on Transparency of AI-Generated Content (final version)Europäische Kommission · Code of practice · 10 Jun 2026
  9. Regulation (EU) 2024/1689 (AI Act)EUR-Lex · Law · 12 Jul 2024

Not legal advice. This content explains the law based on primary sources; it does not replace an assessment of your individual case.

Label your first AI image

Free in your browser, with the EU icon and text in 24 languages. On Shopify, the app labels your whole store.

No upload. Your first 3 images without sign-up.