Shopify Speed Optimization: 22 Fixes Beyond "Compress Your Images"

Shopify Speed Optimization: 22 Fixes Beyond "Compress Your Images"

  • November 30, 2026
  • SEO
No Comments

Shopify speed optimization means fixing the parts of your store that Shopify does not control for you. Shopify already runs the servers, the CDN and file compression. What slows most stores down is the hero image, the theme's Liquid code, the apps and the scripts you added.

That is why compressing images often changes very little. Shopify's own performance team found that stores which lazy-load their main image are linked to a Largest Contentful Paint (LCP) about 3 seconds slower than stores that load it eagerly. That is one setting, and no compression tool can fix it.

This blog walks through 22 fixes in the order that moves the numbers most. It starts with the LCP image, then goes into Liquid and server response time, apps and scripts, fonts, and load order. Each fix explains what to change and why it works, in plain words.

Why Your Shopify Store Is Still Slow After Compressing Images

Your Shopify store is still slow because images are only one input. On most stores, the real delay sits in three other places. These are how long Shopify takes to render your Liquid, what your app scripts do to the browser's main thread, and how your theme loads the hero image.

Shopify runs the server, the CDN and the compression, and you cannot speed those up. What you can change is the theme, the Liquid, the apps and the scripts. So the real answer to how to speed up a Shopify store is to work on those four things.

The table below shows where the line sits.

Shopify handles this for you You control this
Servers and hosting Your theme and its sections
Global CDN, backed by Cloudflare Liquid loops and metafield lookups
Brotli and gzip compression Installed apps and their scripts
HTTP/3 and TLS 1.3 Hero image loading and animations
Image resizing through image_url Fonts, stylesheets and load order

 Every fix in this blog sits in the right-hand column. Shopify confirms the left-hand column in its platform performance documentation.

The Three Numbers That Matter Now

Shopify no longer gives you one speed score. In 2024, Shopify replaced its Lighthouse-based Speed Score with a Web Performance dashboard that uses real visitor data from the past 28 days.

The dashboard tracks the three Shopify Core Web Vitals. You can find it in your admin under Online Store, then Themes. Google uses the same three numbers as a ranking signal, which is why they matter for your Shopify SEO too.

The dashboard tracks the three Shopify Core Web Vitals. You can find it in your admin under Online Store, then Themes. Google uses the same three numbers as a ranking signal, which is why they matter for your Shopify SEO too.

Metric What it measures Good Needs work Poor Common Shopify cause
LCP (Largest Contentful Paint) How fast the main content shows 2.5 s or less 2.5 to 4 s Over 4 s Lazy-loaded or hidden hero image
INP (Interaction to Next Paint) How fast the page reacts to a tap or click 200 ms or less 200 to 500 ms Over 500 ms Heavy app and tracking JavaScript
CLS (Cumulative Layout Shift) How much the layout jumps 0.1 or less 0.1 to 0.25 Over 0.25 Late app widgets and font swaps

To pass, at least 75% of your page loads need a Good score on each metric. Google explains these thresholds in its Core Web Vitals blog.

Fix the LCP Image First (Fixes 1 to 5)

On most Shopify stores, the LCP element is the hero banner, the main product image or the collection header. 

Fixing how that one image loads moves the number more than anything else in Shopify speed optimization. That makes Shopify LCP optimization the cheapest big win in this blog.

Start by finding your LCP element. Open Chrome DevTools, run a Performance recording, and look for the LCP marker. Then apply the five fixes below to that element.

1. Stop Lazy-Loading the Hero Image

Lazy-loading the hero image is the most common and most damaging mistake in Shopify themes. Shopify calls it one of the most damaging anti-patterns in its theme docs. The HTTP Archive data mentioned above links eager loading of the LCP image with an LCP about 3 seconds faster.

Here is the trap. Shopify's image_tag filter already loads images eagerly in sections 1 to 3 and lazily from section 4 onward. Many themes override that by hardcoding loading: 'lazy' in the hero section. Search your hero section file for that line and remove it.

For image grids, load the first row eagerly and lazy-load the rest. Use forloop.index to do it.

2. Give the Hero Image High Fetch Priority

This is a one-line change. The fetchpriority="high" attribute tells the browser to fetch the hero image before other resources.

Use it on one image per page, and only on the real LCP element. Never combine it with loading="lazy". The two attributes contradict each other, and lazy wins. Shopify's fetchpriority guide shows the correct pattern.

3. Take the Fade-In Off the Hero

This one surprises people. The browser cannot record LCP until the image paints at an opacity above zero. If a script triggers the fade-in six seconds into the page load, LCP is six seconds, even though the image downloaded in two.

Check Online Store, then Themes, then Customize, then Theme settings, then Animations. Turn off options like page transitions or reveal on scroll. If you must keep an effect, Shopify's animation guide says to use a CSS keyframe animation instead of a JavaScript trigger. Keep it under 0.3 seconds.

4. Replace CSS Background-Image Heroes With a Real Image Tag

The browser has a preload scanner that finds images early in the HTML. It cannot see an image that only exists inside CSS as a background-image. So the browser discovers the hero late, after it downloads and reads the stylesheet.

Swap the background image for a real <img> built with image_tag. Then position it with CSS, using object-fit: cover to keep the same look.

5. Use the Picture Element for Separate Mobile and Desktop Heroes

Many themes load a desktop hero and a mobile hero, then hide one with CSS. The visitor still downloads both. That doubles the cost of your most important image.

The <picture> element fixes this. It lets the browser choose one source by screen size, and it downloads only the image that matches.

The same logic applies to sliders and video heroes. A five-slide carousel or an autoplay video makes the browser do far more work before the first paint. Show one strong image first. 

If you need video, use a light poster image and load the video after the page appears.

Cut Your Server Response Time in Liquid (Fixes 6 to 11)

Liquid runs on Shopify's servers on every request. The time it takes shows up as your Time to First Byte (TTFB), and no amount of browser-side work shortens it. This is the part most Shopify speed optimization guides skip entirely, and it is how you reduce Shopify TTFB.

Watch for one clear symptom. A theme that is quick with 10 products and slow with 500 almost always has a loop problem, not an image problem.

The table below sums up the six Liquid fixes before the details.

Fix What goes wrong Impact per Shopify docs
6. Profile first You optimize the wrong code Saves days of guessing
7. Untangle nested loops Work grows quadratically with catalog size High
8. Move metafields out of loops Each lookup repeats on every pass High
9. Stop over-fetching variants Every variant triggers database work High
10. Limit loops and pagination Loops fetch far more than the page shows Medium
11. Move assigns and filters out Same result calculated again and again Low, but adds up

6. Profile Before You Touch Anything

Install the Shopify Theme Inspector for Chrome. It shows a flame graph of your Liquid render, line by line. You see exactly which sections and snippets take the longest.

Guessing here wastes days. Profile the home page, one collection page and one product page before you change any code.

7. Untangle Deeply Nested Liquid Loops

Loops nested across products, variants and options grow quadratically with catalog size. Double your products, and the work can grow four times. Shopify names deeply nested loops the most common cause of high TTFB.

Flatten them with Liquid filters like map, where and first. These filters pull the data you need without looping inside another loop.

8. Move Metafield Access Outside Loops

Every metafield lookup queries the backend. Inside a loop, it repeats on every pass, multiplied by variants per product, multiplied by products in the collection.

Read the metafield once, before the loop, and store it in a variable. For anything that does not change per product, like a store-wide badge text, use a theme setting instead of a metafield.

9. Stop Over-Fetching Variants

Looping through every variant forces expensive database work. Many product cards only show the first price and an option or two.

Load only what the first render shows. Build option pickers from product.options_with_values instead of looping through every variant.

10. Limit What Loops Fetch and Cap Pagination

Add a limit to every for loop on collection. products. A homepage block that shows 8 products should never fetch 50.

Keep pagination depth under 25,000 objects. Shopify lists that ceiling in its theme performance best practices.

11. Move Repeated Assigns and Filter Calls Out of Loops

If a calculation gives the same result on every pass, do it once before the loop. The same goes for filter calls with the same inputs and for repeated block.settings lookups.

Each change is small on its own. Shopify puts the combined saving from these Liquid patterns at 25 to 50 ms of TTFB on complex themes.

Audit the Apps and Scripts You Forgot About (Fixes 12 to 17)

Apps are one of the biggest causes of poor INP on Shopify, because each one adds JavaScript that competes for the main thread. The worst damage usually comes from apps nobody uses any more. So the fastest way to fix INP on Shopify is often to delete things.

Here is useful context on Shopify app speed impact. To be listed in the App Store, an app must not cut storefront Lighthouse scores by more than 10 points. That limit applies to each app on its own. Fifteen apps that each pass the test can still add up to a slow store.

12. Find and Remove Render-Blocking App Scripts

A script without defer or async in the <head> stops the browser from reading the rest of the HTML. Nothing renders until it finishes.

Go to Online Store, then Themes, then Edit code, and open layout/theme.liquid. Search for <script and note any external domain or app name. 

Then open the Network panel in Chrome, filter by JS, and match each third-party domain to an installed app. Also check Theme settings, then App embeds, and switch off embeds you do not need.

13. Delete Leftover Code From Uninstalled Apps

Uninstalling an app does not always clean your theme. Shopify's help docs confirm that some apps leave code behind. Dead snippets keep firing requests to a service that no longer exists.

Look in the snippets folder for files named after old apps. Then search theme.liquid for render tags that call them. Remove both, and test the page after each removal.

14. Remove the A/B Test Anti-Flicker Snippet When No Test Is Running

Anti-flicker snippets hide your whole page until the testing script loads. That stops visitors from seeing the original version flash before the test version.

When no test is live, the snippet is pure delay for nothing. Remove it, and end finished tests quickly instead of leaving them running.

15. Load Drawer, Filter and Modal JavaScript on Interaction

Most visitors never open the cart drawer, the filter panel or the size guide. Yet many themes load that JavaScript on every page view.

Use a dynamic import() inside the event listener. The code then arrives only when someone opens the feature.

16. Build Hidden Component DOM Only When Opened

Filter panels, cart drawers and mega menus can add a large number of DOM nodes while they sit closed. A bigger DOM makes every style update and every interaction slower.

Build that markup on first open instead of on page load. Shopify also suggests merging duplicate mobile and desktop menus into one responsive menu.

17. Reserve Space for App-Injected Content

Review stars, trust badges and "recommended for you" rows often load late. When they appear, they push the content below them down. That jump is layout shift, and it hurts CLS.

Wrap each app block in a container with a min-height that matches its final size. The space stays reserved, so nothing moves.

Fonts, CSS and the Jumping Layout (Fixes 18 to 20)

Fonts and stylesheets affect all three Core Web Vitals. Too many stylesheets slow interactions, external fonts slow the first paint, and font swaps make text jump.

18. Reduce the Number of Stylesheets

Each extra <link rel="stylesheet"> triggers a new style recalculation. Shopify notes that this work can block interactivity and hurt INP.

Combine small app and section stylesheets where you can. Load section-specific CSS only on the templates that use those sections.

19. Self-Host Your Fonts on the Shopify CDN

Loading fonts from Google Fonts adds a DNS lookup and a new connection to another server. That costs time before any text can show in your brand font.

Put font files in your theme's /assets folder or use the Shopify font library. They then load from the Shopify CDN on your own domain, with HTTP/3, Brotli compression and edge caching, with no setup. Preload only the one or two fonts used above the fold.

20. Match Your Fallback Font's Metrics to the Real One

font-display: swap stops invisible text. But it causes a jump when the real font arrives and its letters take up a different amount of space. Almost no Shopify guide covers this second half.

Fix it with size-adjust and metric overrides on the fallback font. These settings make a system font like Arial take up the same space as your brand font. The numbers below are examples, so calculate the right values for your own font pair.

Load Order and the Next Click (Fixes 21 to 22)

The last two fixes change when things load, not what loads. They are small code changes with an outsized effect on how fast the store feels.

21. Move First-Paint Resources Above the Content-for-Header Tag

Shopify streams the HTML response on eligible pages. The first part runs up to {{ content_for_header }}, and the second part follows once your sections finish rendering. Anything above that tag reaches the browser while Shopify is still working.

So place your base stylesheet, font preloads and import map above content_for_header. Streaming only works on pages built with JSON templates, and the tag must stay plain, with no filters around it. 

Before you move anything, check for inline scripts that depend on Shopify.* objects, and confirm your CSS cascade order still works.

22. Turn On the Speculation Rules API

The Speculation Rules API lets the browser prefetch or prerender the likely next page, so the next click feels instant. Since June 2025, Shopify has added a default speculation rule to every Liquid storefront. 

It prefetches only when a shopper presses down on a link, which is the most cautious setting.

You can add a stronger rule of your own. Collection to product is the obvious pair on a store. Keep cart, checkout and account links out of any prerender rule.

If You Are on Horizon, Check the Animation Settings

Horizon is Shopify's newest free theme family, and it ships with motion turned on. In the theme's public settings file, page transitions and the transition to the main product page are both on by default. As fix 3 showed, transitions can delay when the browser records LCP.

Open Theme settings, then Animations, and turn off page transitions. Then test the LCP on your home and product pages again. Keep hover effects on product cards if you like them, because they do not run until someone interacts.

Shopify's own theme performance data shows where Shopify theme performance stands on real stores. 

Theme LCP Good CLS Good INP Good Pass all three
Dawn 97.9% 96.9% 96.5% 92.6%
Horizon 97.6% 96.8% 94.2% 90.1%

Both themes perform well. The biggest gap is INP, so Horizon stores should keep a close eye on app scripts and interaction-heavy blocks.

Three Things That Look Like Speed Fixes and Are Not

Some popular advice costs time and changes nothing. A few tips even make the store slower. 

Here are the three that come up most.

The advice Why it does not help
"Add a CDN and turn on compression." Shopify already serves every store through its own CDN with Brotli and gzip compression.
"Install a speed booster app." Many add another script to the page. Shopify already prefetches pages on click by default.
"Preload every important file." Preloading too much makes files compete. Shopify advises preloading only 1 or 2 late-found resources.

"A speed booster app will fix everything" is the most common myth of the three. An app cannot rewrite your nested Liquid loops or remove a fade-in from your hero. Fix the theme and the app list first, then decide if any extra tool still earns its place.

What Order to Do All This In

Order matters in Shopify speed optimization because some fixes are cheap and some take a developer days. Follow the steps below to get the largest wins first.

  1. Get a baseline from the Web Performance dashboard before changing anything. Note your LCP, INP and CLS by page type, so you can prove what each change did. A full SEO audit can add the crawl and ranking side to this picture.
  2. Fix the LCP image, because it is the cheapest large win. Fixes 1 to 5 often take less than an hour and can move LCP by whole seconds.
  3. Audit apps and scripts, since this is usually the biggest total saving. Work through fixes 12 to 17, and remove anything that does not earn sales.
  4. Profile Liquid with the Theme Inspector if TTFB is slow. Fixes 6 to 11 need a developer, so only start them when the data points there.
  5. Re-measure after 28 days, not after 28 minutes. The dashboard uses 28 days of real visitor data, so early numbers still include the old, slower visits.

If you would rather hand the technical work to a team, our Shopify speed optimization service follows this same order.

Final Thoughts

Image compression is the start of Shopify speed optimization, not the finish. The biggest wins sit in the hero image, the Liquid loops and the apps you forgot. Measure first, fix in order, and give the data 28 days. 

Speed also feeds straight into rankings, so pair this work with strong ecommerce SEO. If you sell from Bangladesh and want one team for speed and growth, our full-service SEO agency covers both. 

Frequently Asked Questions

Why Is My Shopify Store Slow Even After Optimizing Images?

Images are only one part of page speed, and Shopify already compresses them for you. Most slow stores lose time in three other places. These are a lazy-loaded or animated hero image, slow Liquid code that raises TTFB, and app scripts that block the main thread. Check your Web Performance dashboard to see which Core Web Vital fails, then fix that area first.

Do Shopify Apps Slow Down Your Store?

Yes, many apps slow your store, because each one can add JavaScript, CSS and network requests to every page. Shopify names installed apps as one of the biggest factors in store performance. Even apps you uninstalled can leave code in your theme. Review your app list every few months and remove anything that does not clearly help sales.

What Is a Good Shopify Speed Score?

Shopify retired its single speed score in 2024 and now uses Core Web Vitals from real visitors. A good result means at least 75% of page loads hit an LCP of 2.5 seconds or less, an INP of 200 ms or less, and a CLS of 0.1 or less. Lighthouse scores from PageSpeed Insights are still useful for testing, but they are lab tests, not real visitor data.

Is Shopify Hosting the Reason My Store Is Slow?

Almost never. Shopify hosts every store on the same managed platform, with a Cloudflare-backed CDN, HTTP/3 and automatic compression. When a store is slow, the cause is nearly always the theme, the apps or custom code. Server response time only gets slow when your own Liquid code makes Shopify do extra work.

Does Upgrading My Shopify Plan Make the Store Faster?

No, a higher plan does not make your storefront load faster. Basic, Advanced and Plus stores run on the same infrastructure and the same CDN. Plus adds business features like checkout customization and higher API limits, not speed. Spend the money on fixing your theme and apps instead.

Should I Switch From Dawn to Horizon for Speed?

Not for speed alone. Shopify's own real-user data from November 2026 gives Dawn a 92.6% pass rate on all three Core Web Vitals, against 90.1% for Horizon. Switch to Horizon for its newer features and editor, and treat the move as a rebuild. If you do switch, turn off page transitions and test your key pages on mobile.

Faisal Mustafa is an Online Market Specialist. He has been providing result oriented quality SEO services to clients worldwide successfully since 2008. He has hundreds of reviews and feedbacks on marketing forums. He is the admin of SEO viser team and a successful online marketer.

OUR SERVICES

Request a free quote

We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.

No Comments

More from our blog

See all posts