> ## 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](https://autorender.io/docs/integrations/shopify.md) is the better fit instead.

> [!NOTE]
>
> 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](https://autorender.io/docs/integrations/shopify.md), [WordPress](https://autorender.io/docs/integrations/wordpress.md)) 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.

## 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**.

> [!NOTE]
>
> If you want to optimize the store images you already upload to Shopify, use the [Shopify integration](https://autorender.io/docs/integrations/shopify.md) 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.

### 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.

> [!NOTE]
>
> To optimize the media in your WordPress library automatically, use the [WordPress plugin](https://autorender.io/docs/integrations/wordpress.md) 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.

### 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](https://autorender.io/docs/native/hero.md) 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

> [card] [Introduction](https://autorender.io/docs/native/introduction.md)
>
> Add the tag and mark your first image.

> [card] [Hero and LCP](https://autorender.io/docs/native/hero.md)
>
> Preload the largest image, which GTM and late-injected tags can delay.

> [card] [Shopify integration](https://autorender.io/docs/integrations/shopify.md)
>
> The server-side alternative for optimizing existing Shopify media.

> [card] [WordPress integration](https://autorender.io/docs/integrations/wordpress.md)
>
> The plugin alternative for optimizing an existing WordPress library.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.