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

# Platforms

> Where the Autorender Native script tag goes in Shopify, WordPress, Webflow, Google Tag Manager, and plain HTML — and when to use a platform integration instead.

Autorender Native is one `<script>` tag, so adding it to a hosted platform means pasting that tag into the site's head. This page shows where the head is on each platform, and when a server-side [integration](/docs/integrations/shopify) is the better fit instead.

<Info>
  There are two ways to run Autorender on a CMS. **Native** (this section) is client-side: you mark elements with `data-ar-src` and the runtime delivers images from your Autorender workspace. A **platform integration** ([Shopify](/docs/integrations/shopify), [WordPress](/docs/integrations/wordpress)) is server-side: it rewrites the platform's *existing* media URLs in place, with no client JavaScript. Pick one per site — see [Native or a platform integration?](#native-or-a-platform-integration) below.
</Info>

## Where does the tag go?

On every platform the rule is the same: load the tag once, in the document `<head>`, with `defer`.

```html wrap theme={null}
<script defer src="https://cdn.autorender.io/native/v1/native.min.js?ws=LOKVTtKVGb"></script>
```

### Shopify

Add the tag to `layout/theme.liquid`, just before `</head>`, under **Online Store → Themes → Edit code**.

<Info>
  If you want to optimize the store images you already upload to Shopify, use the [Shopify integration](/docs/integrations/shopify) instead — it rewrites your theme's image URLs server-side and needs no client script. Reach for Native only when you are placing images from an Autorender workspace into the theme yourself.
</Info>

### WordPress

Add the tag to your theme's `header.php` before `</head>`, or through a header-snippet plugin so a theme update never removes it.

<Info>
  To optimize the media in your WordPress library automatically, use the [WordPress plugin](/docs/integrations/wordpress) instead — it rewrites `src` and `srcset` on the front end and adds an Autorender media picker. Use Native when you are hand-placing workspace images in templates.
</Info>

### Webflow

Open **Site settings → Custom code → Head code**, paste the tag, and publish. For a single page instead of the whole site, use the page's **Custom code → Inside head tag** field. Webflow images set through the Designer keep their own URLs, so mark the elements you want Autorender to size with `data-ar-src` in an embed or via custom attributes.

### Google Tag Manager

Create a **Custom HTML** tag, paste the script, and set the trigger to **Initialization – All Pages** so it loads as early as GTM allows. Because GTM injects the tag after the initial parse, use the [hero pattern](/docs/native/hero) for your Largest Contentful Paint image rather than relying on the runtime.

### Plain HTML or a static site

Add the tag to the `<head>` of your template or layout. That is the whole install:

```html {2} wrap theme={null}
<head>
  <script defer src="https://cdn.autorender.io/native/v1/native.min.js?ws=LOKVTtKVGb"></script>
</head>
```

## Native or a platform integration?

Both deliver optimized images; they differ in what they optimize and how.

|                   | Native (script tag)                                    | Platform integration                                           |
| ----------------- | ------------------------------------------------------ | -------------------------------------------------------------- |
| Runs              | In the browser                                         | Server-side URL rewrite                                        |
| Optimizes         | Elements you mark with `data-ar-src`                   | The platform's existing media, in place                        |
| Image source      | Your Autorender workspace (or a remote `https://` URL) | The store or site's own media URLs                             |
| Client JavaScript | One script tag                                         | None                                                           |
| Best for          | Landing pages, no-build sites, workspace-hosted assets | Optimizing a Shopify or WordPress library you already maintain |

Run one approach per site. Using both on the same images means two systems rewriting the same URLs.

## Next steps

<CardGroup cols={2}>
  <Card title="Introduction" icon="bolt" iconType="solid" href="/docs/native/introduction">
    Add the tag and mark your first image.
  </Card>

  <Card title="Hero and LCP" icon="gauge-high" iconType="solid" href="/docs/native/hero">
    Preload the largest image, which GTM and late-injected tags can delay.
  </Card>

  <Card title="Shopify integration" icon="shopify" iconType="brands" href="/docs/integrations/shopify">
    The server-side alternative for optimizing existing Shopify media.
  </Card>

  <Card title="WordPress integration" icon="wordpress" iconType="brands" href="/docs/integrations/wordpress">
    The plugin alternative for optimizing an existing WordPress library.
  </Card>
</CardGroup>
