Blog· HubSpot performance 9 min read

HubSpot Speed and Performance Optimization: The 2026 Playbook

HubSpot CMS ships on a fast CDN, so slow HubSpot sites are almost always self-inflicted: oversized hero images, theme CSS loaded everywhere, blocking fonts and a stack of marketing scripts. Here is the order we fix them in.

HubSpot Speed and Performance Optimization: The 2026 Playbook — HubStack HubSpot article cover
In this article
  • Step 0: measure the page that matters, on the device that matters
  • 1. Fix the image pipeline first — it is usually half the win
  • 2. Stop shipping the whole theme to every page
  • 3. Take fonts off the critical path
  • 4. Audit third-party scripts ruthlessly
  • 5. Keep HubDB and dynamic pages honest
  • 6. Forms, embeds and the shifting-layout problem
  • 7. Re-measure, then protect the gains

HubSpot CMS gives you a global CDN, HTTP/2, automatic minification and image resizing out of the box. So when a HubSpot site loads slowly, the platform is rarely the cause — the build is. In every audit we run, the same handful of decisions account for most of the delay, and they are all fixable without leaving the portal.

This playbook is the order we work in on a real engagement: measure the right thing first, fix what blocks the first paint, then trim the payload that nobody notices until mobile. It complements our deeper diagnostic write-up on why your HubSpot website is slow and what Core Web Vitals actually measure — that post explains the metrics, this one is the implementation sequence.

Speed is also no longer just a ranking input. Slow pages lose conversions before they lose rankings, and AI crawlers that time out simply do not cite you. That is why performance is bundled into HubSpot technical SEO rather than treated as a separate project.

Step 0: measure the page that matters, on the device that matters

Do not optimise the homepage because it is the one you look at. Pull your top five landing pages by sessions from HubSpot analytics, then test each one in PageSpeed Insights on mobile and record the field data (CrUX) alongside the lab score. Field data is what Google uses; lab data is only a debugging aid.

Write the starting numbers down — Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift and total transferred bytes. Without a baseline you cannot tell whether a change helped or whether you just moved the problem.

One caveat specific to HubSpot: preview URLs and the live domain do not perform identically, because preview skips some CDN caching. Always test the published page on the production domain.

What to record before you change anything
MetricGood targetUsual HubSpot culprit
LCPUnder 2.5sUncompressed hero image or a font-blocked headline
INPUnder 200msChat widget, tracking scripts, heavy carousel JS
CLSUnder 0.1Images without width/height, late-loading banners and forms
Page weightUnder 1.5MBTheme CSS/JS loaded on every template plus large PNGs

1. Fix the image pipeline first — it is usually half the win

HubSpot's file manager will happily serve the 4000px PNG someone uploaded from a design tool. Resize before upload to roughly twice the largest rendered size, export as WebP, and let HubSpot's resizing parameters handle the rest. A hero that drops from 1.8MB to 120KB moves LCP more than any other single change.

Use HubSpot's `resize_image_url` HubL filter or the srcset support in the image module so phones do not download desktop assets. Set explicit width and height attributes on every image — missing dimensions are the most common cause of layout shift on HubSpot templates.

Lazy-load everything below the fold and, critically, do not lazy-load the hero. A lazy-loaded LCP image delays the very metric you are trying to improve. Add `fetchpriority="high"` to the hero instead.

2. Stop shipping the whole theme to every page

Marketplace themes and many custom themes attach one global stylesheet and one global JS bundle to every template, including landing pages that use three modules. HubSpot lets you attach CSS and JS at the template and module level — use it. Move slider, tab and animation code into the modules that need them.

Inside modules, prefer `{% require_css %}` and `{% require_js %}` blocks so assets load once, in the right order, only when that module is on the page. This is the change that usually takes a 900KB render-blocking bundle down to something reasonable.

If you inherited a theme you cannot fully restructure, our HubSpot theme customization work typically starts here: audit which assets each template actually needs, then unbundle.

Module-scoped assets in a HubSpot module
{% require_css %}
  <link rel="stylesheet" href="{{ get_asset_url('../../css/carousel.css') }}">
{% end_require_css %}

{% require_js position="footer" %}
  <script src="{{ get_asset_url('../../js/carousel.js') }}" defer></script>
{% end_require_js %}

3. Take fonts off the critical path

Three weights of two families, loaded from Google Fonts, will delay your headline by hundreds of milliseconds on a mid-range phone. Cut to the weights you actually use, self-host the files in HubSpot's file manager so they come off the same CDN, and set `font-display: swap` so text paints immediately.

Preload only the single font file used by above-the-fold text. Preloading everything is the same as preloading nothing — you just move the contention.

4. Audit third-party scripts ruthlessly

The fastest HubSpot template in the world still loses to five marketing tags. Chat widgets, heatmaps, A/B tools, two analytics platforms and an old retargeting pixel routinely add 400–800KB of JavaScript that competes with your own code for the main thread — and INP is the metric that suffers.

List every script in the portal's tracking code and each template's head. For each one, name the person who reads its data. Anything without an owner comes off. What survives gets loaded `async` or `defer`, and chat widgets get delayed until first interaction or scroll rather than on load.

This is also where HubSpot–GA4 double-tracking hides. If both are firing plus a tag manager container, you are paying three times for the same pageview, which is part of why your HubSpot and GA4 numbers never match.

5. Keep HubDB and dynamic pages honest

Dynamic pages built on HubDB are fast until a template loops the full table on every request, or runs several `hubdb_table_rows` calls to render one listing. Query once, filter with the API's own parameters rather than in HubL, and limit the columns you pull.

For large directories, paginate at the query level instead of rendering 500 rows and hiding most with CSS. The pattern we use for scaled listings is in HubDB programmatic SEO.

6. Forms, embeds and the shifting-layout problem

HubSpot forms load asynchronously, so any page that renders a form inline will shift unless you reserve space for it. Set a min-height on the form wrapper that matches the rendered height, and the same for embedded videos and maps.

Replace autoplaying background video with a poster image and a click-to-play, or a short compressed loop capped at a few hundred kilobytes. Video is the second-biggest payload offender after images on HubSpot landing pages, as we found rebuilding Mistertango's mobile experience.

7. Re-measure, then protect the gains

Re-run the same five pages, on the same devices, and compare against the numbers you wrote down. Expect the image and asset-scoping work to deliver most of the improvement, and script cleanup to deliver the INP change.

Then make it durable: add an image size limit to your content guidelines, review new modules for global asset attachments before publishing, and check Core Web Vitals monthly. Performance is a maintenance habit, not a one-off project — which is why it is part of every HubSpot support and maintenance plan we run.

FAQ

Questions people actually ask AI about this.

Why is my HubSpot website slow when HubSpot uses a CDN?

The CDN only accelerates delivery of what you built. Oversized images, theme-wide CSS and JS, blocking fonts and third-party marketing scripts are added by the site, not the platform, and they dominate load time.

What is a good page speed score for a HubSpot site?

Aim for field-data LCP under 2.5 seconds, INP under 200 milliseconds and CLS under 0.1 on mobile. A lab score above 80 on mobile PageSpeed Insights is a reasonable working target.

Should I use WebP images in HubSpot?

Yes. HubSpot serves WebP fine, and it typically cuts image weight by 25–50% versus PNG or JPEG at the same visual quality. Resize before upload rather than relying on CSS to shrink a large file.

Does lazy loading help HubSpot page speed?

Below the fold, yes. Never lazy-load the hero or any image that is the Largest Contentful Paint element — that delays the exact metric you are trying to improve.

How do I stop HubSpot theme CSS loading on every page?

Attach stylesheets at template or module level and use require_css and require_js blocks inside modules so assets load only when that module is rendered, instead of globally in the theme settings.

Do HubSpot forms slow down my page?

They add an asynchronous request and can cause layout shift if no space is reserved. Set a min-height on the form container matching its rendered height to keep CLS low.

How much do third-party scripts affect HubSpot performance?

Substantially. Chat widgets, heatmaps and duplicate analytics commonly add 400–800KB of JavaScript and are usually the main cause of poor Interaction to Next Paint scores.

Does page speed affect HubSpot SEO rankings?

Core Web Vitals are a confirmed Google ranking signal. The larger effect is commercial: slow pages lose conversions and AI crawlers that time out cannot cite your content.

Can HubDB dynamic pages be fast?

Yes, if you query once with server-side filters and limits rather than looping the whole table in HubL and hiding rows with CSS. Paginate at the query level for large directories.

How much does HubSpot speed optimization cost with HubStack?

HubStack works at $30/hour. A focused performance audit and fix pass typically runs between $150 and $1,200 depending on how many templates and modules need restructuring.

Proof

What this looks like when it's done right.

Want your HubSpot site audited and made fast?

Related

Technical SEO services

Redirect mapping, metadata baselines, canonical configuration, schema and indexing controls — handled as an ongoing programme rather than a launch-week scramble.

HubSpot technical SEO
Keep reading

How to Set Up HubSpot CRM for a 30-Person Team (Without Overbuilding It)

Most failed CRM rollouts are overbuilt, not underbuilt. Here is the order we configure HubSpot for a 30-person company — and everything we deliberately leave out of version one.

Read article