Shopify speed optimization: what really slows a store down
- Topic
- Development
- Published
- Reading time
- 9 min read
- Written by
- Binaery
Shopify speed optimization is mostly a job of taking things away. Shopify already runs the servers, the content delivery network and the image resizing, so a slow store is nearly always slow because of what was added on top: the theme's own code, the apps, and the tags and pixels pasted in over the years.
By the end of this you'll know where to find your store's real speed numbers, what to check first, and what to ask a developer to change. You don't need to write code to follow it.
The short version
- Shopify handles hosting, the content delivery network, compression and image resizing for every store. You can't tune those, and you don't need to.
- Shopify names three things that decide a store's speed: the theme, the apps you've installed, and third party code you've added by hand, tag managers included.
- Removing an app doesn't always remove its code from your theme. Leftovers keep loading for every visitor.
- The largest picture on the first screen should load first and at once. Shopify calls lazy loading it one of the most common mistakes in Shopify themes.
- Measure with Shopify's own web performance reports, which count real visits, before you trust a score from a testing tool.
- Be wary of anything that promises a higher score without changing what a shopper sees.
Here's the piece of code. It's how a theme should print the main picture at the top of a page:
{{ section.settings.image
| image_url: width: 1600
| image_tag:
loading: 'eager',
fetchpriority: 'high'
}}
In plain words: ask Shopify for the picture at a sensible width, load it at once, and tell the browser it matters more than the others. Only one picture on a page gets that treatment. If the top picture in your theme says lazy where this says eager, you've found your first fix.
What Shopify already does for you
Start with the things you can cross off. Shopify's help center lists what every store gets without asking:
- Fast global servers, with no limit on your store's bandwidth.
- A content delivery network, and browser caching set to one year.
- Compression and minification of CSS and JavaScript.
- An image CDN that resizes and compresses pictures, and often serves them as WebP.
This matters the day a scanning tool hands you a long list of recommendations. Shopify says many of them are already done, or don't apply to a Shopify store: anything about server setup, adding a CDN or switching on compression. Skip those lines. Read the ones about your own images, apps and theme.
What really slows a store down
Shopify's answer is short. The biggest factors are your theme, the apps you've installed, and any other third party code you've added by hand, including tag managers and the tags inside them.
Apps and tags
Shopify's developer docs describe how this happens as "death by a thousand cuts". Marketing adds a tracking pixel. Someone installs an app for a campaign. The campaign ends, and the code keeps running. Repeat that for three years.
The browser has one main thread that draws the page, runs JavaScript and answers taps, and every script competes for it. That's why a store with a lot of scripts feels slow to respond even after it looks loaded. The usual suspects, from Shopify's guide to auditing third party scripts:
- Two analytics tools counting the same visits.
- A/B testing tools, which often hold up the page for every visitor to serve a test to a few.
- Chat widgets that load on every page and are rarely opened.
- Review apps that load everywhere, when reviews only show on product pages.
- Email popups, social feeds and ad pixels from platforms you may no longer use.
Then there's what apps leave behind. Uninstalling an app doesn't always take its code out of the theme. Shopify's advice is to search the theme files for the app's name, look for snippets it created, and check the page source for its domain.
For the scripts that stay, ask where they need to run. A review widget only needs product pages:
{% if template.name == 'product' %}
<script src="https://reviews.example.com/widget.js" defer>
</script>
{% endif %}
That says: load this script on product pages only, and don't hold up the rest of the page for it. The address is a stand in. Your developer swaps in the real one.
The theme
A theme sets the floor. To be accepted into the Shopify Theme Store, a theme needs a minimum average Lighthouse performance score of 60 across the home page, product page and collection page, according to Shopify's performance best practices. That's measured on a benchmark store, before your apps, your tags and a homepage with thirty sections on it.
Shopify's own tips for store owners are plain ones. Keep the number of sections on a template down. Paginate collections with a lot of products. If your theme offers page transitions or other animations, compare your numbers before and after you switch them on.
Inside the theme's code, the most common cause of a slow first response is a loop inside a loop: for every product, go through every variant. It costs more with every product you add. If your store got slower as your catalog grew, that's where a developer should look first.
The picture at the top of the page
The number most people mean by "speed" is Largest Contentful Paint: how long it takes for the biggest thing on the first screen to show. On a store that's usually the hero picture or the main product photo.
Here are two homepages on a phone, as we designed them. On the first, for an intimate care brand, a large photo sits at the top of the screen, so that photo is the one that has to arrive first. On the second, for a pet DNA test brand, the headline and the button come before the picture, so there's something to read and tap while the picture is on its way.
Intimate care brand
The homepage on a phone, as designed
Pet DNA test brand
The homepage on a phone, as designed
Either layout can be fast, as long as the theme treats that first picture differently from the twentieth. Shopify's docs list the ways themes get it wrong, starting with lazy loading the main picture:
- Lazy loading it. Lazy loading tells the browser to wait. That's right for pictures far down the page and wrong for the first one.
- Loading it through a JavaScript library. Older lazy loading scripts hide the picture's address from the browser until the script has run.
- Fading it in. A reveal animation delays the moment the picture counts as shown, even after it has downloaded.
- Building the top of the page in JavaScript. Product details and hero content should arrive ready made in the page, not get assembled in the browser afterward.
How to measure it
Shopify measures your store with real visits and shows the result in your admin. Open Online Store and you'll see a summary of three numbers, the Core Web Vitals, each ranked Good, Moderate or Poor. The full web performance reports are under Analytics, then Reports.
| Number | What it tells you | Good is |
|---|---|---|
| Largest Contentful Paint (LCP) | How fast the largest thing on the screen shows | 2,500 milliseconds or less |
| Interaction to Next Paint (INP) | How fast the page answers a tap or a click | 200 milliseconds or less |
| Cumulative Layout Shift (CLS) | How much the page jumps around while it loads | 0.1 or less |
The summary uses real visitor data from the past 30 days, and it can run up to 36 hours behind, so don't judge a change the same afternoon. The reports also show how changes such as app installs and theme updates affected the numbers, which is the quickest way to catch the app that cost you half a second.
For a closer look at one page, Shopify points to Google's PageSpeed Insights. It tests a single load of a page, so its score won't match what your real visitors get. Use the reports to decide whether you have a problem, and the testing tool to find the cause.
A worked example: one afternoon with the app list
Say your store has 14 apps installed, a tag manager with 9 tags in it, and an INP ranking of Moderate. This is the afternoon we'd spend on it.
- Write down every app and every tag. Next to each, write who uses it and what it earned or saved last quarter. Shopify's test is whether each one creates enough value to make up for what it costs in speed.
- Say four apps turn out to be unused: an old popup, the reviews app from before you switched, a countdown timer from last November, and a chat widget nobody answers. Remove them.
- Search the theme for what they left behind, by app name and by script address. Do it on a copy of the theme first.
- Say two of the nine tags belong to ad platforms you stopped paying. Remove those too.
- For everything that stays, ask where it has to run. Reviews on product pages. Chat after a visitor does something, not on arrival.
- Wait a full week, then open the INP over time report and compare.
Nothing on that list is clever. It's a tidy up, and it's where we'd start before touching the theme itself.
What speed optimization won't fix
- A score that was gamed. Shopify's developer docs warn about fake performance apps and services. Some spot a testing tool and serve it a stripped down page. Others slip in an invisible element so the number improves while the shopper waits just as long. Shopify says it has removed most of these apps from its App Store, and that the same trick is now sold as a service on freelance sites. If someone offers you a score, ask what the shopper will see sooner.
- A page that doesn't sell. A fast page that leaves the shopper's question unanswered is still losing the order. What's on the page is a separate job, and our guide to what a product page should show first covers that half.
- An alarm on sale day. Shopify notes that during high traffic events, third party monitoring tools can show a store as slow or down while it's working fine for real customers, because Shopify puts real customer traffic ahead of bots at peak times. Check your own phone before you panic.
A speed checklist for a Shopify store
- Open Online Store in your admin and note the three rankings, for phones first.
- List every app and tag with its owner and its value. Remove what nobody can defend.
- Search the theme for code left by apps you've removed.
- Check that the first picture on your homepage, collection page and product page isn't lazy loaded and doesn't fade in.
- Limit each remaining script to the pages that need it.
- Wait a week and compare the reports. Change one group of things at a time, so you know what worked.
Common questions
Why is my Shopify store slow?
A Shopify store is usually slow because of what has been added to it. Shopify names three main factors: the theme, the installed apps, and third party code added by hand, such as tag managers and tracking pixels. Hosting, the content delivery network and compression are handled by Shopify for every store.
What is a good speed for a Shopify store?
Shopify ranks a store on three Core Web Vitals, measured from real visits. Good means a Largest Contentful Paint of 2,500 milliseconds or less, an Interaction to Next Paint of 200 milliseconds or less, and a Cumulative Layout Shift of 0.1 or less. You can see your store's rankings on the Online Store page of the Shopify admin.
Do Shopify speed optimization apps work?
Be careful with them. Shopify's developer docs warn that some speed optimization apps and services only change what testing tools see, so the score improves while real shoppers wait just as long. Judge any speed work by whether the main picture shows up sooner and buttons answer sooner on a real phone.
Next step
Open your Shopify admin, go to Online Store and read the three rankings. If any of them says Moderate or Poor, start with the app list. Speed is one of the five areas our site audit goes through, and our page on how we build prints its own speed numbers from your browser while you read it. If you'd like us to look at your store, tell us about it and one of us will write back within 48 hours.
Keep reading.
Rather have us do it?
Everything in this article is something we do for a living. Tell us about the store and what you're trying to move.
Fly our work



