Astro Weekly #17

Astro 4.3 released, optimize Astro images with Unpic, automate Open Graph images in Astro

Happy Tuesday, Astronauts!

The age of “spatial computing” has arrived. Who among you will be the first to read Astro Weekly on the Apple Vision Pro I wonder?

Back here in the real world, you may have heard Astro has launched its very own official monthly newsletter, dubbed The Astro Post. But don’t worry, your weekly Astro fix is here to stay, bringing you all the latest updates from across the community and more to your inbox each week.

On that note, let's check out what’s been happening.

This week in Astro ✨

Astro 4.3 released ⚡️

Can’t stop, won’t stop. The releases just keep on coming; Astro 4.3 is now available.

Astro 4.3 introduces an experimental feature called domains i18n configuration. This feature allows you to assign different domains or subdomains to support various locales for your website. For instance, you can designate example.com for English, fr.example.com for French, and so on.

You can map specific locales to corresponding domains or subdomains in your astro.config.mjs file like so:

// astro.config.mjs
import {defineConfig} from "astro/config"

export default defineConfig({
    site: "https://example.com",
    output: "server", // required, with no prerendered pages
    adapter: node({
      mode: 'standalone',
    }),
    i18n: {
        defaultLocaLe: 'en',
        locales: ['en', 'es', 'pt_BR', 'pt', 'fr'],
        domains: {
            fr: "https://fr.example.com",
            es: "https://example.es"
        },
        routing: {
          prefixDefaultLocale: true,
        }
    },
    experimental: {
        i18nDomains: true
    },
})

Head on over to the official Astro blog for all the details on Astro 4.3, including improvements to working with your build output, component prop types, Markdown images, and more.

Astro Community 🧑‍🚀

The best framework deserves the best images

Optimize Astro images with Unpic 🏞️

Unpic, an open-source toolkit for displaying images on the web, has rolled out significant enhancements to its Astro integration.

While Unpic has provided a native image component for Astro for almost a year, these latest updates introduce an integrated image service. This means developers can seamlessly leverage Unpic's responsive, high-performance images without any code modifications.

Furthermore, Unpic will also now automatically generate placeholder images, including dominant color, blurhash, and low-res image, which helps to mitigate large contentful paint times. Nice!

Subscribe to keep reading

This content is free, but you must be subscribed to Astro Weekly to continue reading.

Already a subscriber?Sign In.Not now