Your Shopify homepage is usually the heaviest page on your store. Hero images, sliders, featured collections, testimonials, Instagram feeds, newsletter popups, and trust badge sections all load at once. Most homepage speed problems trace back to three sources: an unoptimized hero image, too many below-the-fold sections loading upfront, and scripts from widgets that fire before the visitor sees anything. Fix the hero first, lazy load everything below the fold, and cut widgets that do not directly drive sales.
Why the Homepage Deserves Its Own Optimization Strategy
Every page type on a Shopify store has a different performance profile. Product pages carry app script weight. Collection pages carry image grid weight. The homepage carries everything. It is designed to represent the entire brand, so merchants pile on every element that feels important.
The result is a page that tries to do too much at once. A homepage with a video hero, three featured collection sections, a testimonials carousel, an Instagram feed, an email popup, a loyalty widget, and a live chat button is loading all of that simultaneously. The browser queues every resource in parallel and still struggles to prioritize what the visitor actually needs to see first.
How to Optimize the Shopify Hero Section
The hero section is the single highest-priority optimization on your homepage. It is almost always the LCP element, the first thing a visitor sees, and the section that sets the perceived speed of the entire page.
Get the image right first. Most hero images are uploaded at the size they come out of a camera or a designer's export. A Shopify merchant using a professional photographer gets images at 4000 by 2600 pixels, somewhere between 3MB and 8MB. That file size is unnecessary for a screen that displays the image at 1400 pixels wide.
- Maximum width: 1400px for desktop, 800px for mobile
- Format: WebP
- File size: under 150KB for desktop, under 80KB for mobile
- Compression quality: 75 to 80 percent (visually indistinguishable from 100 percent on screen)
Use Squoosh.app to compress and convert. It is free, browser-based, and shows a live comparison of before and after quality as you adjust settings. For a hero image going from 4MB JPEG to 140KB WebP, the visual difference on screen is zero. The load time difference is significant.
Use the correct Liquid implementation. The hero image Liquid tag matters as much as the file itself. This implementation covers responsive sizing, WebP delivery, and priority loading:
<img
src="{{ section.settings.hero_image | image_url: width: 1400, format: 'webp' }}"
srcset="
{{ section.settings.hero_image | image_url: width: 600, format: 'webp' }} 600w,
{{ section.settings.hero_image | image_url: width: 900, format: 'webp' }} 900w,
{{ section.settings.hero_image | image_url: width: 1400, format: 'webp' }} 1400w
"
sizes="100vw"
fetchpriority="high"
loading="eager"
width="1400"
height="600"
alt="{{ section.settings.hero_image.alt | escape }}"
>
fetchpriority="high" attribute is the most impactful single attribute you can add. It tells the browser to download this image before almost everything else in the queue. Combined with loading="eager" this, it regularity, it improves LCP by 0.5 to 1.5 seconds.Mobile hero: a separate image or a cropped version. Hero images designed for a 1400 by 600 desktop ratio look poor on mobile when the browser crops or letterboxes them. Many Shopify themes support separate hero images for mobile. Use this if available and serve a portrait-format image (around 800 by 900 pixels) for mobile visitors. A mobile-optimized hero image at 80KB loads faster and looks better than a landscape desktop image scaled down to a phone screen.
Why Sliders Hurt Shopify Homepages and What to Replace Them With
Sliders are the most common homepage element that costs more than it contributes, both in performance and in conversion.
A slider with five images loads all five on page load. The browser downloads every slide even though the visitor will likely only ever see the first one. If each slide is 300KB, the slider adds 1.2MB of unnecessary downloads. On top of that, slider JavaScript libraries (Swiper.js, Flickity, and Splide) are each 30 to 80 KB, loading globally.
Multiple studies in e-commerce UX research show that slider click-through rates drop dramatically after the first slide. The first slide gets the vast majority of engagement. Slides two through five are largely ignored by real visitors. You are paying a significant performance cost for content almost no one sees.
What to use instead: A single, well-designed hero section with one strong image, a clear headline, and one call to action outperforms a slider in both speed and conversion for most Shopify stores. If you genuinely need to feature multiple promotions simultaneously, a static split layout (two hero panels side by side on desktop, stacked on mobile) delivers the same information at a fraction of the performance cost.
If you absolutely need a slider for brand or design reasons, implement these fixes:
- Load only the first slide image on page load, lazy load slides two through five
- Disable autoplay (autoplay fires JavaScript continuously and hurts INP)
- Set the slider JavaScript to load with
deferso it does not block initial rendering
How to Lazy Load Homepage Content Below the Fold
Everything below the first viewport on your homepage does not need to load when the page first opens. Lazy loading below-the-fold sections is one of the highest-impact optimizations available for homepage speed.
Images below the fold: Every product image in a featured collection section, every testimonial headshot, every logo in a brand strip. If it starts below what a visitor sees on load, add loading="lazy" to the <img> tag:
<img
src="{{ product.featured_image | image_url: width: 400, format: 'webp' }}"
loading="lazy"
width="400"
height="500"
alt="{{ product.title | escape }}"
>
App-powered sections below the fold: Instagram feed widgets, review carousels, and loyalty program banners below the fold should not initialize until the visitor scrolls near them. Use Intersection Observer to trigger initialization:
const lazySection = document.querySelector('.instagram-feed-section');
if (lazySection) {
const observer = new IntersectionObserver(function(entries) {
if (entries[0].isIntersecting) {
loadInstagramWidget();
observer.disconnect();
}
}, { rootMargin: '300px' });
observer.observe(lazySection);
}
The rootMargin: '300px' loads the widget 300 pixels before it enters the viewport so it is ready when the visitor reaches it, with no visible delay.
Optimizing Featured Collection Sections
Featured collection sections are the biggest contributor to homepage weight after the hero. A homepage with three featured collection sections, each showing eight products, is loading 24 product images simultaneously alongside the hero.
Show four products per featured collection section, not eight or twelve. Four is enough to represent the range of a collection. Eight requires double the image downloads and increases DOM size significantly. Visitors who want to see more can click through to the full collection.
Product images in featured collection sections typically display at 300 to 400 pixels wide on desktop. Serving them at 800 pixels wide is wasteful. Match your image_url width parameter to the actual display size. Using width: 800 for thumbnails downloads four times the necessary data.
Each featured collection section adds to DOM size, JavaScript initialization overhead, and image download count. Three featured collections is a reasonable maximum. If your homepage currently has five or six, consolidate or remove the least-performing ones based on click analytics.
How to Reduce Homepage Scripts
The homepage accumulates more scripts than any other page type because every app wants to be present from the first visit. Popup apps, chat widgets, social proof notifications, review badges, loyalty widgets, currency switchers. All of them initialize on the homepage.
Audit what loads specifically on the homepage. Open Chrome DevTools Network tab and filter by JS while your homepage loads. Count the external domain scripts. Make a list of which app each script belongs to. Now ask for each one: does this app actually need to function on the homepage?
Restrict scripts to relevant pages. In your theme code, wrap app script tags in Liquid conditionals to prevent them from loading on the homepage:
{% unless template == 'index' %}
<script src="https://reviewapp.example.com/widget.js" defer></script>
{% endunless %}
The index template is Shopify's identifier for the homepage. This pattern loads the review script on every page except the homepage, where it serves no purpose.
Delay non-critical scripts. For scripts that should be present on the homepage but are not needed immediately, delay their loading until after the visitor's first interaction:
let scriptsLoaded = false;
function loadDeferredScripts() {
if (scriptsLoaded) return;
scriptsLoaded = true;
const chatScript = document.createElement('script');
chatScript.src = 'https://chatwidget.example.com/widget.js';
chatScript.async = true;
document.head.appendChild(chatScript);
}
document.addEventListener('scroll', loadDeferredScripts, { once: true, passive: true });
document.addEventListener('mousemove', loadDeferredScripts, { once: true });
document.addEventListener('touchstart', loadDeferredScripts, { once: true });
Improving Above-the-Fold Speed
Everything visible before a visitor scrolls is above the fold. This viewport determines your LCP, your FCP, and the visitor's first impression of your store's speed. It needs to load before anything else.
- Your logo and navigation header
- Your hero image or headline
- An announcement bar if you have one
- App widget initializations
- Third-party tracking script payloads
- CSS for sections the visitor cannot see yet
Preload critical assets. Add preload hints in your theme.liquid for the assets that above-the-fold content depends on:
<head>
<!-- Preconnect to CDN -->
<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
<!-- Preload critical font -->
<link rel="preload" as="font"
href="{{ 'YourFont.woff2' | asset_url }}"
type="font/woff2" crossorigin>
<!-- Preload hero image if it's a known static asset -->
<link rel="preload" as="image"
href="{{ settings.hero_image | image_url: width: 1400, format: 'webp' }}">
</head>
<style> tag in your <head> to remove the render-blocking external CSS request for above-the-fold content.Minimizing Widgets and Their Performance Cost
Widgets are the category of homepage elements that feel essential but are often optional or replaceable with lighter implementations.
Typically loads 60 to 120KB of JavaScript plus makes API calls to Instagram on every page load. Static screenshots of your Instagram feed uploaded as a regular image section achieve the same visual effect with zero JavaScript and no API calls. Update the static images monthly.
Loads 40 to 80KB of JavaScript that initializes immediately. Most chat conversations happen on product and cart pages, not the homepage. Restrict chat to load only on product and cart templates, or delay it until after first scroll interaction.
The "Someone in Paris just bought X" toast loads a JavaScript library that polls a server every few seconds. Test whether yours is actually driving purchases before deciding it is worth 50KB of JavaScript on every homepage load.
How to Test Shopify Homepage Speed
Testing the homepage requires a structured approach. Single tests are unreliable. Testing only on desktop misses your most important traffic segment.
Single tests can vary by 10 or more points due to server response variation. Three tests give you a reliable number. Always test both mobile and desktop separately. Mobile is your primary optimization target.
After any significant change (removing a section, changing the hero image, removing an app), run the three-test sequence again. Over time this log tells you which changes move the needle most.
In the Opportunities section, look for the hero image in "Properly size images" or "Serve images in next-gen formats," multiple app scripts in "Reduce the impact of third-party code," and render-blocking resources. Fix the largest savings first, then retest before moving to the next item.
Load your homepage on an actual mid-range Android phone over a real mobile connection. Scroll through it. Tap the navigation. Notice what feels slow or what shifts around as the page loads. Lab tests measure metrics. A real device test tells you what the experience feels like.
Balancing UX and Speed on the Shopify Homepage
Speed and design quality are not opposites. But they do require trade-offs, and being clear-eyed about those trade-offs leads to better decisions.
A well-placed testimonial section that builds trust and drives sales. A featured collection section that drives product discovery. These earn their performance cost when they demonstrably contribute to conversion. Keep them and optimize how they load.
A slider where only the first slide gets clicked. An Instagram feed that nobody engages with. A chat widget that fires on the homepage where nobody needs support. These are performance costs without matching revenue contribution. Remove them.
Shopify Homepage Speed Best Practices
Hero Image
- WebP format, under 150KB
-
fetchpriority="high"attribute - Explicit width and height set
-
loading="eager"(never lazy) - Recompress whenever the hero image changes
Sliders and Collections
- Replace sliders with a single hero image whenever possible
- If keeping a slider, lazy load slides two through five and disable autoplay
- Maximum three featured collection sections
- Four products per section, images at 400px wide
-
loading="lazy"on all product images
Scripts and Widgets
- Restrict app widgets to pages where they function
- Delay chat and non-critical widgets until after first interaction
- Consolidate tracking into Google Tag Manager
- Add
deferto all non-critical script tags - Load app scripts conditionally using Liquid template checks
Ongoing Maintenance
- Run PageSpeed on the homepage on the first of each month
- After any theme update or new app install, retest within 48 hours
- Log before and after scores for every significant change
- Test on a real mid-range Android device monthly
Summary
Homepage speed optimization on Shopify is fundamentally about prioritization. The hero image gets optimized and loaded first with the highest priority. Everything below the fold loads lazily, after the critical content is already visible. App scripts load only on pages where they function. Widgets earn their place by demonstrating conversion impact.
A fast homepage does not just score better in PageSpeed. It converts visitors into browsers and browsers into buyers before impatience makes that first impression the last one.