Astro 6.1 Brings Fine-Grained Image Control and Smarter i18n Routing

Astro 6.1 Brings Fine-Grained Image Control and Smarter i18n Routing

lschvn4 min read

Astro 6.1 dropped on March 31, and while it's not as dramatic a release as Astro 6.0's experimental Rust compiler, it ships three targeted improvements that address real friction points for content-heavy sites deployed at the edge.

Sharp Image Service Gets Encoder-Level Controls

The most practically useful change: you can now set codec-specific defaults for Astro's built-in Sharp image pipeline directly in astro.config.mjs. Before 6.1, you could control per-image quality, but the underlying encoder options β€” MozJPEG level, WebP effort, AVIF chroma subsampling, PNG compression β€” were fixed.

In 6.1, with astro/assets/services/sharp, you get:

// astro.config.mjs
export default defineConfig({
  image: {
    service: {
      config: {
        jpeg: { mozjpeg: true },
        webp: { effort: 4 },
        avif: { effort: 3, chromaSubsampling: '4:2:0' },
        png: { compressionLevel: 9 }
      }
    }
  }
});

These become defaults for compile-time image generation. Per-image quality set on <Image />, <Picture />, or getImage() still takes precedence β€” the hierarchy is preserved.

For sites generating hundreds of variant images at build time, the WebP effort and AVIF settings in particular can meaningfully shift the size/quality tradeoff without touching every image call.

SmartyPants Gets an Options Object

Astro has long supported SmartyPants for automatic typographic refinement in Markdown. 6.1 surfaces the full retext-smartypants options object:

export default defineConfig({
  markdown: {
    smartypants: {
      backticks: 'all',
      dashes: 'oldschool',
      ellipses: 'unspaced',
      openingQuotes: { double: 'Β«', single: 'β€Ή' },
      closingQuotes: { double: 'Β»', single: 'β€Ί' },
      quotes: false
    }
  }
});

This matters for sites with localization requirements or strict typographic standards β€” French, German, and Nordic languages have specific quotation conventions that the boolean-only config couldn't express. The oldschool dash mode (-- for en-dash) is another long-requested option.

i18n Fallback Routes Now Visible to Integrations

The third change is invisible to end users but matters for the ecosystem: integrations can now see fallback routes generated for i18n configurations using fallbackType: 'rewrite'. Previously, these routes existed in the runtime but weren't exposed via the astro:routes:resolved hook. Integrations that build route indexes β€” most notably the sitemap integration β€” would miss generated fallback routes, producing incomplete sitemaps for multilingual sites.

6.1 adds fallbackRoutes to the IntegrationResolvedRoute type:

'astro:routes:resolved': ({ routes }) => {
  for (const route of routes) {
    for (const fallback of route.fallbackRoutes) {
      console.log(fallback.pathname) // e.g. /fr/about/
    }
  }
}

The Cloudflare Effect

Astro joined Cloudflare in January 2026, and the 6.1 release is consistent with that direction: content-heavy sites deployed on Workers/Pages, image optimization at the edge, typographic polish that serves readability. The team is no longer spread across funding concerns and can focus on the framework's core positioning. Astro remains MIT-licensed and platform-agnostic, but the roadmap increasingly reflects what Cloudflare's infrastructure makes easy.

Upgrade with:

npm install astro@latest

Frequently Asked Questions

Related articles

More coverage with overlapping topics and tags.

Astro 6 Takes Center Stage: Rust Compiler, Live Content, and a Cloudflare Future
astro

Astro 6 Takes Center Stage: Rust Compiler, Live Content, and a Cloudflare Future

Astro 6.0 and 6.1 land within weeks of each other, bringing an experimental Rust compiler, request-time content collections, a built-in Fonts API, CSP tooling, and deeper Cloudflare integration β€” all while the framework doubles its adoption for the third year running.
Vite 8 Stable Lands, Seven Patches Follow in Three Weeks
javascript

Vite 8 Stable Lands, Seven Patches Follow in Three Weeks

Vite 8.0.0 shipped stable on March 12, and the patch releases haven't stopped β€” v8.0.7 landed April 7 with fixes across CSS, SSR, WASM, and dev server behavior. A contrast to the long beta cycle.
EmDash: Cloudflare's TypeScript-Based WordPress Successor with Sandboxed Plugins
astro

EmDash: Cloudflare's TypeScript-Based WordPress Successor with Sandboxed Plugins

Cloudflare has built EmDash, a new open-source CMS written entirely in TypeScript and powered by Astro. Plugins run in isolated Dynamic Workers, solving WordPress's decades-old plugin security crisis where 96% of security issues originate.

Comments

Log in Log in to join the conversation.

No comments yet. Be the first to share your thoughts.