Skip to content

SEO: image issues — missing alt (2), zero lazy loading (61 imgs), no width/height (CLS), 1.8 MB of PNG/JPEG #258

Description

@limonte

Problem

61 <img> elements across src/ and recipe-gallery/, with several issues:

Missing alt

  • src/components/Prtnr.tsx:86<img src={prtnr.imageUrl} />
  • recipe-gallery/sweetalert2-laravel.tsx:96

(The rest do have alt; Header.tsx correctly uses alt="" for the decorative logo track.)

Zero lazy loading

$ grep -rno 'loading="lazy"' src recipe-gallery --include=*.tsx | wc -l
0

Nothing on the site is lazy-loaded. The worst case is Sponsors.tsx, which eager-loads ~40 sponsor logos far below the fold on the homepage — all competing for bandwidth with the LCP element. Every one of them should be loading="lazy" decoding="async".

The GitHub-stars <iframe> at src/components/Header.tsx:39 (ghbtns.com) also has no loading="lazy" and sits at the very top of the page.

Missing intrinsic dimensions

Most <img> have no width/height (some do — e.g. Themes.tsx passes width={300}). Without both dimensions the browser can't reserve space, so images popping in shift layout → CLS, which is a Core Web Vitals ranking signal.

No modern formats

public/images/ is 1.8 MB of PNG/JPEG/GIF with only one .webp (prtnrs/deel.webp). Notable offenders:

  • public/images/prtnrs/hostinger.png332 KB
  • public/images/picture.jpg — 156 KB
  • public/images/sweetalert2.gif and nyan-cat.gif — animated GIFs

WebP/AVIF would cut most of these by 60–80%.

Suggested fix

  1. Add alt to the two images missing it (Prtnr should use the partner name; alt="" if genuinely decorative).
  2. Add loading="lazy" decoding="async" to all below-the-fold images — centralise it in the Sponsors/Prtnr render loops rather than per-link.
  3. Add loading="lazy" to the GitHub-stars iframe.
  4. Add width/height to every <img>.
  5. Convert public/images/** to WebP (keep PNG fallback only where needed); re-compress hostinger.png.

Impact

Medium — direct CLS/LCP improvement, and CWV is a ranking signal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions