> ## Documentation Index
> Fetch the complete documentation index at: https://www.alttextlab.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Web snippet

> Automatically generate and apply alt text to every image on your website with a single script tag.

The AltTextLab web snippet is a JavaScript embed that detects images without alt text on each page load and generates descriptions for them automatically.

## How it works

1. You add one `<script>` tag to your site's `<head>`
2. On the first visit to any page, the snippet detects images missing alt text and submits them for generation
3. Generated alt text is cached on a CDN — every subsequent visit gets the result instantly

Alt text is generated once per image. The CDN cache means no repeated processing and no impact on page load performance.

## Key properties

**Non-blocking** — the snippet loads asynchronously using the `defer` attribute. It never blocks page rendering — your content loads normally while the script processes images in the background.

**Lightweight** — the script is optimized for modern browsers and adds negligible overhead to your site's resources. It does not interfere with existing scripts or styles.

**CDN-delivered** — once alt text is generated for an image, it is cached in a global CDN and delivered in milliseconds on every subsequent page view, even under high traffic.

**Privacy-safe** — the snippet processes only public image URLs to generate alt text. No visitor data is collected or stored.

**SEO-safe** — alt text is applied to `alt` attributes directly in the DOM. Search engines index it the same way they would static markup, with no negative SEO impact.

**Scalable** — whether your site has dozens of images or millions of assets, the architecture handles traffic spikes without bottlenecks.

<Note>
  When connecting a new site with a large existing media library, there may be an initial delay while the system processes all images for the first time. Every image will be processed — once cached in the CDN, alt text is delivered instantly on all subsequent visits.
</Note>

## Requirements

An active AltTextLab subscription is required. Without one, new images won't receive generated alt text, and existing alt text will eventually become unavailable on your site — it will be removed from the CDN.

That said, your alt text isn't lost: it remains saved in your dashboard. Once you resume your subscription, it will become available on your site again without using any additional credits.

## Next steps

<CardGroup cols={2}>
  <Card title="Get started" icon="bolt" href="/web-snippet/get-started">
    Create your first web snippet in the dashboard.
  </Card>

  <Card title="Installation" icon="code" href="/web-snippet/installation">
    Embed the script and configure parameters.
  </Card>

  <Card title="Ignoring decorative images" icon="eye-slash" href="/web-snippet/ignoring-decorative-images">
    Skip icons, spacers, and other non-content images.
  </Card>
</CardGroup>
