Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 37 ยท SEO and Performance

Images, Assets and Core Web Vitals

Make Joomla pages fast to see and use: Media Manager habits, responsive images, lazy loading, CSS and JS delivery and how to read LCP, INP and CLS.

On most websites the biggest bytes are images and the biggest delays are scripts. After caching and compression, the next improvement usually comes from sending smaller, better-timed assets. Google summarizes the visitor's experience in three numbers called the Core Web Vitals, and they also influence search rankings, so they are worth understanding.

Joomla cannot run on this site; menu paths are described and two JavaScript stand-ins let you rate vitals and choose image sizes.

The three vitals

Metric Measures Good Needs work
LCP Largest Contentful Paint How long until the biggest visible element (often a hero image or heading) is shown 2.5 s or less over 4 s
INP Interaction to Next Paint How quickly the page reacts to clicks, taps and keys 200 ms or less over 500 ms
CLS Cumulative Layout Shift How much visible content jumps while loading 0.1 or less over 0.25

Values between "good" and "needs work" are labeled "needs improvement". Real-user numbers appear in Search Console (Core Web Vitals report) and in the Chrome UX Report; lab tools such as Lighthouse or PageSpeed Insights give quick diagnostics.

JS Rate your Core Web Vitals

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The Media Manager

Images enter Joomla through Content > Media (the Media Manager). Habits that pay off:

  • Resize before upload when you can. A 6000-pixel-wide photo from a phone is far larger than any layout needs. The Media Manager has an Edit tool for cropping and resizing, and a Media Action - Resize plugin (enable it in System > Plugins, group Media Action) can scale images down automatically on upload to the maximum size you set.
  • Choose a sensible format: WebP or AVIF for photos (smaller than JPEG), SVG for logos and icons, PNG only for graphics that need it.
  • Name files meaningfully (sourdough-loaf.webp, not IMG_2043.JPG), and create folders by topic.
  • In System > Global Configuration > Media (or Media options) set the allowed file extensions and a maximum upload size; do not allow executables.
  • Write alt text when you insert an image. It is an accessibility need and helps image search.

Responsive images and lazy loading

A phone does not need the desktop version of a picture. HTML solves this with srcset and sizes: the browser picks the best candidate for the screen width and pixel density. Joomla 4.1 and later include a Content - Responsive Images plugin that generates several sizes of images inserted in articles and adds the srcset automatically (enable it in System > Plugins and review its options). Joomla also adds loading="lazy" to images inserted by the editor and to article intro/full-text images, so images far below the fold load only when the visitor scrolls near them.

Two rules for lazy loading:

  1. Never lazy-load the LCP image (usually the top hero). Give it loading="eager" or fetchpriority="high", otherwise the page looks slower.
  2. Always give images dimensions, with width and height attributes or CSS aspect-ratio, so the browser reserves space before the file arrives; this is the main cure for CLS.
HTML
<img src="/images/hero-1200.webp"
     srcset="/images/hero-600.webp 600w, /images/hero-1200.webp 1200w, /images/hero-2000.webp 2000w"
     sizes="(max-width: 700px) 100vw, 1200px"
     width="1200" height="600" alt="Fresh bread on a wooden table"
     fetchpriority="high">
JS Which srcset candidate would load?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

This is a simplified model of what the browser does with srcset; real browsers also factor in the network and cache.

CSS and JavaScript delivery

Joomla 4 and 5 manage assets through the Web Asset Manager, which means extensions declare their CSS and JS as named assets with dependencies and versions. That is good news: you get deduplication and cache-busting hashes. What you can do:

  • Remove extensions that load large libraries on every page. Compare the page before and after disabling an extension on staging.
  • Load scripts with defer so they do not block rendering. Core and well-written extensions do this already.
  • Keep your own CSS in user.css (see Cassiopeia and Template Styles) rather than adding another framework.
  • Avoid sliders, autoplay carousels and chat widgets above the fold unless you need them; they hurt LCP and INP.
  • Use font-display: swap for web fonts and host fonts yourself to avoid extra connections (and a privacy question about third-party font servers).
  • Avoid heavy third-party tags: each tracker adds scripts that block the main thread, which lengthens INP.

Where a minification and combining extension exists, test it carefully: with HTTP/2 or HTTP/3, combining files matters less than it once did, and aggressive options can break scripts. Prefer fewer, smaller assets over clever packaging.

A measuring routine

  1. Pick the five most visited pages (analytics or Search Console).
  2. Test each in PageSpeed Insights on mobile, saving the LCP element and the opportunities list.
  3. Fix the largest item first, normally the hero image: size, format, preload.
  4. Check CLS by looking for missing image dimensions, injected banners and late fonts.
  5. For INP, find the long tasks: extensions that run a lot of JavaScript on click, and big third-party tags.
  6. Re-test after each change and note the result; keep a log.
JS Estimate image weight per page

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The saving percentages are rough assumptions for the demo, not measurements: always compare real files with your own settings.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which metric measures layout jumps while a page loads?

    Cumulative Layout Shift. Reserve space for images, ads and embeds to keep it low.
  2. 2. Which image should not use loading="lazy"?

    Lazy loading would delay the most important image; mark it eager or high priority.
  3. 3. What does the Content - Responsive Images plugin help with?

    It creates smaller variants and adds srcset so browsers pick a suitable size.
  4. 4. What is a good INP value?

    INP is good at 200 ms or less; 2.5 s is the LCP threshold and 0.1 the CLS threshold.

Summary

  • Core Web Vitals are LCP, INP and CLS; learn their good thresholds and measure on real pages.
  • Resize and compress images, use WebP/AVIF/SVG and meaningful names, and always write alt text.
  • Use srcset, width/height and lazy loading, but not for the LCP image.
  • Trim scripts, defer what you can and be wary of third-party tags and heavy extensions.
  • Measure, change one thing, measure again.

Next: Multilingual Sites