Performance
astro-compress
Last in the integrations list. Compresses HTML, CSS, JS, SVG. Do not set Image: true — CmsImage already uses astro:assets and would double-process.
Image optimisation
CmsImage.astro wraps astro:assets Image. resolveImage(path) in src/lib/assets.ts resolves a CMS path (e.g. src/assets/uploads/team/jane.jpg) to ImageMetadata. Use it whenever a block needs an image.
Bypass with a plain <img> when:
- The image is in a
listfield where dimensions are unknown at build time. - The image is purely decorative and not worth the
<picture>overhead.
Bundle size
- Trim
optionsinthemeselects (drops unused daisyUI themes from the picker config but the CSS bytes stay). - Use
import()for heavy blocks (e.g. CodeMirror) when authoring. - Tailwind 4's
@sourceandinline-text-safelist.csskeep the JIT from bloating.