Performance Optimization

Page size, image optimization, lazy loading, render-blocking resources, compression, caching, and Time to First Byte explained.

Hugo Team·March 9, 2026
performancespeedpage sizeimageslazy loadingcompressioncachingttfbrender blocking

Page speed is a confirmed Google ranking factor for both desktop and mobile.[1] Hugo's performance category runs 8 checks that assess your page's loading characteristics — contributing 12% to the main page score.[1] These checks analyze the raw HTML response, not JavaScript-rendered content.

Page Size

HTML Page Size
Lightweight
Heavy
Very Heavy
< 200 KB200–500 KB> 500 KBKB

HTML Page Size (KB)

Good
Under 200 KB
Warning
200–500 KB
Poor
Over 500 KB
This measures the size of the initial HTML document only (not including images, CSS, and JS). Large HTML files take longer to download and parse, especially on mobile networks.[1]

Image Count & Lazy Loading

Hugo counts all images on the page and checks how many use the loading="lazy" attribute.[2] Lazy loading defers off-screen images until the user scrolls near them, significantly improving initial page load.

Image Count (images)

Good
1–20 images
Warning
Over 20 images
Pages with many images should implement lazy loading to prevent all images from loading at once.[2]

Render-Blocking Resources

Script tags without async or defer attributes block the browser from rendering page content.[3] Hugo counts these render-blocking scripts and flags them.

CountStatusRecommendation
0Pass ✓All scripts are properly deferred
1–3Info ℹConsider adding defer or async attributes
4+Warning ⚠Too many blocking scripts — prioritize deferring them

Compression & Caching

Hugo checks the Content-Encoding header for gzip, Brotli (br), or deflate compression. Compressed responses can be 70–90% smaller. It also verifies Cache-Control headers are set to enable browser caching.[4]

Time to First Byte (TTFB)

TTFB (ms)

Good
Under 300ms
Warning
300–1800ms
Poor
Over 1800ms
TTFB measures how quickly your server begins responding to requests.[5] It reflects server processing speed, database queries, and network latency. A fast TTFB is the foundation of overall page speed.

References

  1. [1]Google Search Central — Using page speed in mobile search ranking — developers.google.com
  2. [2]web.dev — Browser-level image lazy loading for the web — web.dev
  3. [3]MDN Web Docs — <script>: async and defer attributes — developer.mozilla.org
  4. [4]MDN Web Docs — HTTP compression — developer.mozilla.org
  5. [5]web.dev — Time to First Byte (TTFB) — web.dev

We value your privacy

We use localStorage to keep you signed in. No tracking cookies are set. Read our Cookie Policy and Privacy Policy for details.