Skip to content
MagiCMS

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 list field where dimensions are unknown at build time.
  • The image is purely decorative and not worth the <picture> overhead.

Bundle size

  • Trim options in theme selects (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 @source and inline-text-safelist.css keep the JIT from bloating.
Vi bruker cookies for å forbedre din opplevelse.