Files
MyAiConfiguration/shared/skills/media/references/image-optimization.md
T
Julian Lechner f5d8f6f11b
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
feat(skills): reworked skills and rules
2026-11-18 14:17:49 +01:00

1.5 KiB

Image Optimization and SEO

  • Start with measured transfer size, rendered dimensions, and the page's LCP element. Keep originals; compare optimized output at its actual display size.
  • Use SVG for suitable vector assets, lossless formats for sharp UI text, and compare WebP/AVIF with existing raster formats for photographs. Choose against target-client support, transparency, quality, and measured size; avoid fixed quality or byte targets for every asset.
  • Match srcset and sizes to the layout, or use the framework's existing image component. Set intrinsic width and height to reserve the correct aspect ratio.
  • Lazy-load offscreen images. Keep the LCP image discoverable in initial HTML and eagerly loaded; consider fetchpriority="high" for that image, not every image.
  • Use descriptive filenames, relevant surrounding text, and useful alt text without keyword stuffing. Decorative images need empty alternative text.
  • For images intended for search, verify crawlable image URLs and standard image markup with a usable src. CSS backgrounds are not a substitute for indexable content images.
  • Reuse existing transformation and caching infrastructure. Measure transferred bytes, rendering quality, LCP, and layout shifts after the change; distinguish lab results from real-user data.

References: HTML images, LCP optimization, Google image SEO.