> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/avante-themes/faq/performance/store-speed-and-pagespeed-optimization.md). Agents can also search and read this documentation through its [MCP server](https://staylime.com/docs/~gitbook/mcp).

# Store speed & PageSpeed optimization

What slows a Shopify store down and what to change first: apps, images, video, page length, fonts, and checkout buttons. Plus why 100/100 is not possible on Shopify.

Store speed depends on more than the theme. Apps, images, video, and the number of sections on a page all add up. Start with the checklist, then read the sections below for details.

{% hint style="info" %}
**Before you test:** run PageSpeed Insights or GTmetrix on your **live published theme**. The theme preview adds Shopify's admin scripts and lowers the score.
{% endhint %}

***

### **Quick checklist**

<table data-search="false"><thead><tr><th>Area</th><th>What to do</th></tr></thead><tbody><tr><td><strong>Apps</strong></td><td>Remove apps and tracking tags you no longer use. Use the theme's built-in features first.</td></tr><tr><td><strong>Content</strong></td><td>Keep pages focused. Fewer sections and fewer products per page load faster.</td></tr><tr><td><strong>Video</strong></td><td>Use short, compressed MP4 files. Avoid a heavy video as the first thing on the page.</td></tr><tr><td><strong>Images</strong></td><td>Compress before uploading. Add a mobile image in banner sections.</td></tr><tr><td><strong>Redirects</strong></td><td>Link straight to the final URL. Avoid chains of redirects.</td></tr><tr><td><strong>Checkout buttons</strong></td><td>Turn off dynamic checkout buttons if speed matters more than express checkout.</td></tr><tr><td><strong>Fonts</strong></td><td>Use as few font families and weights as you can.</td></tr><tr><td><strong>Animation</strong></td><td>Keep Preload links on hover on. Pages of links visible on screen load in advance, and it does not run in the theme editor.</td></tr></tbody></table>

***

### **Limit third-party apps**

Apps are the biggest speed factor in most Shopify stores. Each app adds its own scripts and styles, often on every page, even where the app is not used.

{% hint style="success" %}
**What to do**

* Before installing an app, check whether Avante already does it. [Product badges](https://staylime.com/docs/avante-themes/features-and-advanced-setup/product-badges.md), countdown timers, [store selector](https://staylime.com/docs/avante-themes/features-and-advanced-setup/store-selector.md), [quick search](https://staylime.com/docs/avante-themes/theme-settings/quick-search.md), and [color swatches](https://staylime.com/docs/avante-themes/features-and-advanced-setup/variant-images-vs-color-swatches.md) are built into the theme.
* Uninstall apps you no longer use. Some apps leave code behind after removal, so ask the app developer to confirm it is gone.
* When two apps do the same job, keep one.
* Review tracking pixels and integrations regularly and remove the ones you no longer need.
  {% endhint %}

***

### **Keep pages focused**

Every section, product card, and widget adds elements the browser has to build. Long pages render more slowly, even on a fast connection.

{% hint style="success" %}
**What to do**

* Keep the homepage to the sections that support your main goal. Swap seasonal content in and out instead of adding more.
* On collection pages, keep **Products per page** moderate. **Infinite scroll** set to **Button** or **Auto** loads the next products only when the shopper asks for them or reaches the end of the grid. See [Default collection](https://staylime.com/docs/avante-themes/templates/default-collection.md).
* Review widgets, social feeds, and other app embeds load external files. Place them where they matter, not on every page.
  {% endhint %}

***

### **Optimize video**

A large video at the top of the page delays the first meaningful paint and raises **Largest Contentful Paint (LCP)**.

{% hint style="success" %}
**What to do**

* Let a hero image or text load first, and place heavy video further down the page.
* Use the theme's video sections instead of embedding video in product descriptions, blog posts, or pages.
* Keep background and hero videos short, ideally under 10 seconds and a few megabytes. Compress them with [HandBrake](https://handbrake.fr/) or a similar tool before uploading.
  {% endhint %}

See [Image & video size recommendations](https://staylime.com/docs/avante-themes/faq/performance/image-and-video-size-recommendations.md) for sizes by section.

***

### **Optimize images**

Images are usually most of a page's weight. Compressing them before upload is the quickest win.

{% hint style="success" %}
**What to do**

* Compress every image with [TinyPNG](https://tinypng.com/) or [Squoosh](https://squoosh.app/) before uploading.
* Use JPG for photos and PNG for graphics with transparency.
* Add a separate **Mobile image** in [banner sections](https://staylime.com/docs/avante-themes/sections/banners/image-banner.md), so phones do not download a wide desktop image.
* Add alt text to every image. It helps accessibility and search.
  {% endhint %}

***

### **Minimize redirects**

Each redirect is an extra round trip to the server. On mobile networks, a chain of redirects adds visible delay.

{% hint style="success" %}
**What to do**

* Point menus, banners, and email links straight to the final page.
* When you retire a product or collection, reuse its URL or redirect it once, to an active page.
* Avoid loops (A → B → A) and chains (A → B → C).
  {% endhint %}

***

### **Dynamic checkout buttons**

Shop Pay, PayPal, Apple Pay, and Google Pay buttons each load their provider's scripts, and the theme cannot defer them. Keep them if express checkout matters more to you than the score.

{% hint style="info" %}
**To turn them off:** [**Theme Editor → Default product**](https://staylime.com/docs/avante-themes/templates/default-product.md) **→ Buy buttons** → turn off **Show dynamic checkout buttons**. Customers still see every payment method at checkout.
{% endhint %}

***

### **Header, fonts, and swatches**

**Header.** The [header](https://staylime.com/docs/avante-themes/global-sections/header-and-navigation/header.md) loads on every page, so everything added to it adds to every page. Keep it to the announcement bar, the logo, and the main navigation.

**Fonts.** Each font family and weight is a separate file the browser downloads before it shows the text. Use as few as your design allows. System fonts such as Arial or Helvetica need no download. See [Typography](https://staylime.com/docs/avante-themes/theme-settings/typography.md).

**Swatches.** Color swatches set as a color are pure CSS. Image swatches load one small image per color. For products with many colors, color swatches are lighter. See [How do I show color swatches](https://staylime.com/docs/avante-themes/faq/products-and-variants/how-do-i-show-color-swatches.md)?

***

### **What our dev team can optimize**

Some improvements need code changes beyond the theme editor. Staylime offers a **Speed Optimization Audit & Fix** service.

{% hint style="success" icon="money-bills" %}
Standard scope (\~8–10 hours at $80/hr) typically includes:

* **Asset localization** — loading JS libraries (Swiper.js, etc.) directly from theme assets instead of external CDNs.
* **Image delivery** — removing overly large srcset sizes and correcting `loading="eager"` on images that aren't above the fold.
* **Render-blocking CSS** — consolidating stylesheets, stripping unused rules, and inlining critical CSS for first-screen sections to speed up First Contentful Paint (FCP).
* **Layout shift (CLS) fixes** — adding explicit `width` and `height` attributes to logos, banners, and announcement bars to eliminate content jumping on load.
* **Accessibility (WCAG)** — adding missing `aria-label` attributes to icon buttons and correcting semantic HTML where needed.
  {% endhint %}

{% hint style="info" %}
To request an audit, [contact our support team](https://staylime.zendesk.com/hc/en-us/requests/new). Tell us your target score or metric, whether you are open to removing heavy apps if they turn out to be the main cause, and whether you are fine with some sections being hardcoded, which removes them from the theme editor.
{% endhint %}

***

### **Why 100/100 is not possible on Shopify**

Some parts of every Shopify store are controlled by Shopify, not by the theme or the merchant:

{% hint style="warning" %}

* **Cache lifetimes** — server caching rules are set by Shopify.
* **Core scripts** — Shopify adds its own tracking scripts to every store. Remove unused custom pixels in **Shopify Admin → Settings → Customer events** to reduce their impact.
* **App scripts** — review widgets, chat, and tracking pixels run on every page. A theme cannot optimize code that an app injects.
  {% endhint %}

A score of 60–85 on a well-set-up store with a few apps is normal and does not noticeably slow the store for real customers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://staylime.com/docs/avante-themes/faq/performance/store-speed-and-pagespeed-optimization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
