// Performance
Website Speed Optimization Guide: How to Make Your Site Fast in 2026
A practical guide to speeding up your website. Covers image optimization, lazy loading, minification, CDN setup, server response time, and Core Web Vitals — with specific actions for each fix.
Why site speed is a business metric, not just a technical one
Every second of page load time correlates directly with lost revenue. Google's research found that as page load time goes from 1 to 3 seconds, the probability of a mobile visitor bouncing increases by 32%. From 1 to 5 seconds, it's 90%. These aren't marginal differences — they're the gap between a profitable site and one that bleeds visitors at the top of the funnel.
Google's Core Web Vitals (Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift) are now ranking signals. A slow site is penalized in search results relative to a faster competitor with equivalent content. Speed optimization is simultaneously a user experience, conversion, and SEO investment.
This guide covers the six highest-impact areas for website speed improvement. The gains are cumulative — a site that does all six well routinely scores 90+ on Google PageSpeed Insights. Each section explains what the problem is, how to measure it, and what to do about it.
Image optimization: the single biggest performance win
Images typically account for 50-80% of a web page's total byte size. On most sites, they're also the least optimized resource — uploaded at original camera resolution, served in JPEG when WebP would be 25-35% smaller, and loaded in full at page initialization even when they're below the fold.
The fixes compound: convert to WebP or AVIF format (widely supported since 2022), resize images to the actual display dimensions rather than serving a 3000px image in a 800px container, add lazy loading so off-screen images don't block initial render, and compress using a tool like Squoosh, Sharp, or ImageOptim. A single correctly optimized hero image can reduce page weight by 500KB.
For WordPress, plugins like ShortPixel, Imagify, or Smush handle format conversion and compression automatically on upload. For Next.js and modern frameworks, the built-in Image component handles WebP conversion, responsive srcsets, and lazy loading automatically. WebEnture's Image Optimization Agent scans every page and lists unoptimized images with their exact savings potential.
- Convert all images to WebP or AVIF format — 25-35% smaller than JPEG at equivalent quality
- Resize images to match their display dimensions before uploading
- Add loading='lazy' to all images below the fold
- Set explicit width and height attributes on images to prevent Cumulative Layout Shift
- Use a CDN to serve images from a location close to your visitors
Related reading:
JavaScript and CSS minification and deferral
JavaScript is the performance villain of the modern web. Render-blocking scripts prevent the browser from displaying anything until the script has been downloaded, parsed, and executed. A single undeferred third-party script (live chat widget, analytics, ad network) can add 300-800ms to your Time to First Byte on slow connections.
Audit your JavaScript with Chrome DevTools Coverage tab — it shows exactly what percentage of each JS file is actually executed on a given page. Most sites load 60-80% unused JavaScript. Unused code that ships to every visitor wastes bandwidth and CPU on mobile devices.
Fixes: add defer or async attributes to non-critical scripts, move scripts to the bottom of the body, use dynamic imports to load code only when needed, and remove unused third-party scripts entirely. For CSS, extract critical (above-the-fold) styles inline and defer the full stylesheet. Tools like PurgeCSS remove unused CSS classes automatically.
- Add defer to all non-critical JavaScript — it won't block HTML parsing
- Load third-party scripts (chat, analytics, ads) only after page interaction using facade patterns
- Minify JS and CSS in production — removes whitespace, comments, and shortens variable names
- Enable Brotli or Gzip compression on your server for all text assets
- Use tree shaking to eliminate unused code from JavaScript bundles
Related reading:
Content Delivery Networks: serving from the edge
A CDN caches your static assets (images, JS, CSS, fonts) on servers distributed globally and serves them from whichever server is geographically closest to your visitor. A user in London hitting a site hosted in New York gets static assets in 20ms instead of 180ms. For image-heavy sites, this alone can cut page load time in half.
Modern CDNs like Cloudflare (free tier available), Fastly, and AWS CloudFront also provide DDoS protection, bot mitigation, and SSL termination as part of the package. For most sites, Cloudflare's free plan delivers 90% of the performance benefit with zero cost.
Beyond static assets, consider edge caching for entire HTML pages on sites with minimal personalization. Vercel Edge Network, Cloudflare Pages, and Netlify all cache rendered HTML at the edge. A cached HTML response from the edge delivers in under 50ms globally, versus 200-500ms for a server-rendered response from a single region.
- Enable a CDN for all static assets — Cloudflare free tier is sufficient for most sites
- Set long cache expiry headers (1 year) for versioned assets using cache-busting filenames
- Enable HTTP/2 or HTTP/3 — CDNs provide this automatically; self-hosted servers need configuration
- Use a CDN with edge caching for HTML pages on sites with low personalization
Server response time and Time to First Byte
Time to First Byte (TTFB) is the time between a browser making a request and receiving the first byte of the response. Google's target is under 800ms; anything over 1.8 seconds is flagged as 'poor' in Core Web Vitals. A slow TTFB means everything else starts late — your CDN, your images, and your JavaScript all wait behind it.
TTFB is determined by server hardware, database query speed, application code efficiency, and network routing. For WordPress sites, a slow TTFB is almost always caused by uncached PHP execution and database queries. A full-page caching plugin (WP Super Cache, W3 Total Cache, or LiteSpeed Cache) that serves pre-rendered HTML completely bypasses PHP and MySQL for anonymous visitors — taking TTFB from 500-1500ms to 50-150ms.
For custom applications, profile your database queries. Slow queries with missing indexes are the most common cause of application-level TTFB problems. Add EXPLAIN ANALYZE to suspect queries, and add indexes on columns used in WHERE clauses and JOINs. WebEnture's Performance Agent measures your site's TTFB from multiple global locations and flags pages with slow server responses.
- Target TTFB under 200ms — achievable with page caching and a CDN
- Enable object caching (Redis or Memcached) for database query results on dynamic sites
- Upgrade hosting if your server is CPU or memory constrained — shared hosting often bottlenecks TTFB
- Reduce DNS lookup time by minimizing the number of domains your page requests resources from
Related reading:
Core Web Vitals: what Google actually measures
Core Web Vitals are Google's official user experience metrics and are incorporated into the Google Search ranking algorithm. Understanding what each metric measures helps you prioritize fixes that improve both user experience and search rankings simultaneously.
Largest Contentful Paint (LCP) measures when the largest visible element (usually a hero image or heading) finishes loading. Target: under 2.5 seconds. Primary fixes: optimize and preload your LCP element, reduce server response time, eliminate render-blocking resources. Use fetchpriority='high' on your LCP image to tell the browser to load it first.
Interaction to Next Paint (INP) replaced First Input Delay in 2024. It measures the delay between any user interaction (click, tap, keypress) and the browser's visual response. Target: under 200ms. Primary fixes: reduce JavaScript execution time, break up long tasks, use requestIdleCallback for non-critical work. Cumulative Layout Shift (CLS) measures unexpected visual movement. Target: under 0.1. Primary fixes: set explicit dimensions on images and ads, avoid injecting content above existing content, use CSS transform for animations instead of properties that trigger layout.
- LCP target: under 2.5s — fix by optimizing the hero image/element and reducing TTFB
- INP target: under 200ms — fix by reducing JS execution time and breaking up long tasks
- CLS target: under 0.1 — fix by setting explicit image dimensions and avoiding dynamic content injection
- Use WebEnture's Performance Agent to measure all three metrics across every page, not just the homepage
- Check both lab data (Lighthouse) and field data (Chrome User Experience Report) — they often differ significantly