Releases of astro
730 stable releases, newest first. Release notes are kept for the last 90 days; older ones link to where they were published.
7.4.1
19 October 2026Patch Changes
Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms
Fixes a typo in the error message shown when a font
cssVariableis invalidFixes a bug where projects whose path contains an apostrophe (
') failed to load sessions, middleware, a cache provider, or asrc/fetch.tshandler
7.4.0
15 October 2026Minor Changes
Adds a new
--timingsflag toastro buildto help you find what slows down your buildsWhen a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the
--timingsflag to your build command to print a summary once the build finishes:astro build --timings
This is helpful to decide what to optimize first, or to compare build times before and after a change to your project.
Adds a new optional
getFontProperties()callback to font providersFont providers can now expose the weights, styles, subsets and formats a font family actually has. Astro uses it when resolving your font configuration to warn about values a provider cannot serve, for example a weight a font family does not offer.
All built-in providers implement it. If you maintain a custom font provider, implementing this callback is optional for now but it will be required in Astro 8:
import type { FontProvider } from 'astro'; const provider: FontProvider = { name: 'my-provider', resolveFont: ({ familyName }) => { // ... }, getFontProperties: ({ familyName }) => ({ weights: ['400', '700'], styles: ['normal', 'italic'], subsets: ['latin'], formats: ['woff2'], }), };Adds a
fetch()function to the font providerinit()contextThis function requests a provider API, retrying transient failures and more. It lets providers that wrap a 3rd-party unifont provider pass the context to it directly:
import type { FontProvider } from 'astro'; import type { InitializedProvider } from 'unifont'; import { acmeProvider } from '@acme/unifont-provider'; export function acmeFontProvider(): FontProvider { const provider = acmeProvider(); let initializedProvider: InitializedProvider | undefined; return { name: provider._name, async init(context) { initializedProvider = await provider(context); }, // ... }; }
7.3.8
8 October 2026Patch Changes
Fixes
Astro.cachebeingundefinedwhen a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't exportFixes
astro addremoving existingallowBuildsapprovals frompnpm-workspace.yamlwith pnpm v11.0–v11.22Refactors internal bundling and code transforms to use Vite's Oxc-based
transformWithOxcand Rolldown instead of esbuild. These packages no longer depend on esbuild directly.
7.3.7
7 October 2026Patch Changes
Fixes a build error when a Markdown content collection entry loaded with
glob({ deferRender: true })has alayoutfrontmatter property.layoutis now ignored for content collection entries, as documented.Fixes
astro add cloudflarefailing to install dependencies with pnpm v11+ by approving theworkerdbuild script, and shows the package manager's error output whenastro addfails to install dependenciesFixes an issue where AVIF images were served as
image/heifinstead ofimage/avifin the dev server.
7.3.6
6 October 2026Patch Changes
Fixes an intermittent dev server crash when using
astro:actionsinside a server island with adapters that use a pre-bundled SSR environment (e.g.@astrojs/cloudflare)Fixes stale scoped styles during HMR when both markup and
<style>are changed in a single saveFixes CSS from other pages leaking into a page's
<head>in dev when the page imports a module such asastro:config/server.
7.3.5
24 September 2026Patch Changes
Adds a new container function called
renderComponent(), which renders Astro components with inlined styles and scripts.Users must import the component with the new
?containerquery string:import { experimental_AstroContainer } from "astro/container"; import TodoList from "../components/TodoList.astro?container"; const container = await experimental_AstroContainer.create(); const _string = container.renderComponent(TodoList);
7.3.4
22 September 2026Patch Changes
Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.
Improves the
astro checkerror shown for TypeScript 7. The command now explains that TypeScript 7 is not currently supported and provides instructions for experimentally type-checking Astro files with TypeScript 7.1 and@astrojs/ts-content-mapper.Fix double-escaped ampersands in Markdown image
altandtitleattributes. The__ASTRO_IMAGE_round-trip now decodes the numeric (&) and named (&) character references the Markdown processors emit, so an&in an alt or title is escaped exactly once in the final HTML instead of twice.
7.3.3
16 September 2026Patch Changes
Refactors internal version handling to use a smaller, ESM-native dependency
Returns appropriate 400 and 404 responses from the image endpoint for invalid and missing local image paths
Fixes
Astro.preferredLocaleListreturning an empty list when a locale is configured with the object form ({ path, codes }) and the browser sends the code with different casing or an underscore, such asen-USmatching a configureden-us
7.3.2
8 September 2026Patch Changes
Fixes
<script>/<style>rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a<script>/<style>child (e.g.<script>{value}</script>) is now escaped like any other element's content instead of being rendered raw. Useset:htmlto explicitly opt a dynamic value back into raw rendering.Fixes the dev toolbar returning a 504 "Outdated Optimize Dep" error when a workspace-linked package imports a dependency that Vite's initial scan did not discover
Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like
/energy/en/aboutinto/esergy/en/about
7.3.1
3 September 2026Patch Changes
Fixes an error that prevented projects using
astro:assetsfrom starting or building
7.3.0
3 September 2026Minor Changes
Adds
--ignore-lockflag toastro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.Adds a
loggerparameter to image services hooksCustom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in
loggerand respect your log level, instead of being written straight to the console:import type { LocalImageService } from 'astro'; const service: LocalImageService = { // ... async transform(inputBuffer, transform, imageConfig, logger) { logger.warn(`Could not optimize "${transform.src}". Passing it through unchanged.`); return { data: inputBuffer, format: 'png' }; }, };Astro's built-in Sharp service now uses this logger for the warnings it emits when it encounters an unexpected or unsupported source format.
Adds
loggerto the context object passed to cache providersCustom cache providers now receive Astro's runtime logger on the context passed to
onRequest(). Messages logged with it are routed through the destination configured inloggerand respect your log level, instead of being written straight to the console:import type { CacheProvider } from 'astro'; const provider: CacheProvider = { name: 'my-cache', async onRequest({ request, url, logger }, next) { logger.warn(`Skipping cache for ${url.pathname} because the response sets a cookie.`); return next(); }, // ... };Astro's built-in
memoryCache()provider now uses this logger for the warnings it emits when it skips caching a response that sets cookies, and when a background revalidation fails.
7.2.10
31 August 2026Patch Changes
Fixes
@astrojs/markdown-remarkbeing pinned to an exact version.Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtime
Invalid URLcrash at server bootFixes a case where the logger was improperly initialized at runtime in dev.
7.2.9
27 August 2026Patch Changes
Fixes importing
.htmlfiles not being typed outside of.astrofilesFixes a crash when requesting
/index.htmlagainst a dynamic page route like[slug].astroFixes SSR manifest containing stale
entryModulesreferences to prerender-only chunks that no longer exist in the final build output
7.2.8
26 August 2026Patch Changes
Updates the minimum supported version of Sharp to 0.35.4
Replaces the internal
find-processdependency with a smaller, lighter alternative
7.2.7
25 August 2026Patch Changes
Deserializes each route once when loading the SSR manifest
Fixes route selection for normalized request paths in adapter and development request handling
Updates generated and default Cloudflare
compatibility_datevalues to match the installed runtime and requires Wrangler^4.125.0
7.2.6
24 August 2026Patch Changes
Fixes a bug where
new FetchState(request)could fail in development when server dependencies were optimized
7.2.5
24 August 2026Patch Changes
Fixes a bug where
experimental_getFontFileURL()rejected valid font URLs when using the Cloudflare adapterSkips no-op pathname writes when normalizing SSR request URLs
Updates deprecation messages target from Astro 7 to 8
7.2.4
19 August 2026Patch Changes
Fixes builds hanging when an image file is malformed
Fixes base path stripping to respect path-segment boundaries. With a configured
basesuch as/docs, a request like/docs-archive/pageis no longer treated as being under the base, so routing andcontext.url.pathnamenow agree on the same pathname.Fixes
astro buildthrowingTypeError: Missing parameterfor dynamic routes whenbuild.format: 'preserve'andtrailingSlash: 'always'are used together. Stripping the framework-injected.htmlsuffix dropped the trailing slash that the compiled route pattern requires, so the route no longer matched itself and its params resolved as empty.
7.2.3
18 August 2026Patch Changes
Fixes an issue where Astro could run out of memory when
experimental.collectionStorageis set tochunkedand there are multiple concurrent updates to the same collection.Fixes the dev server sometimes matching against stale routes after pages were added, removed, or renamed, requiring a dev server restart to pick up the change
Fixes the composable request helpers (
astro/fetch) throwing an error when used on a request that had been rewritten withAstro.rewrite()ornext()
7.2.2
13 August 2026Patch Changes
Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment
Fixes incremental builds dropping optimized images for cached pages when using a
collectStaticImagesprerenderer (e.g.@astrojs/cloudflarewith compile-time image optimization)Fixes intermittent
ImageNotFounderrors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.
7.2.1
11 August 2026Patch Changes
Fixes CSS hot module replacement after navigating between pages with
ClientRouterFixes a CSP violation when using both
security.cspandexperimental.clientPrerenderwithdata-astro-prefetchlinks. The dynamically injected<script type="speculationrules">now uses a static"source": "document"approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSPscript-srcdirective at build time.Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.
7.2.0
6 August 2026Minor Changes
Adds the
astro preview --backgroundflag to start preview servers as background processes.This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.
astro preview --background
When a preview server is running in the background, you can inspect or stop it with new
astro previewsubcommands:astro preview status astro preview logs astro preview logs --follow astro preview stop
If Astro detects that
astro previewis being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior forastro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.To opt out of automatic background mode for preview servers, set
ASTRO_PREVIEW_BACKGROUND=0before runningastro preview.Adds support for paths relative to your project root in
logger.entrypointPreviously, pointing
logger.entrypointat a custom log handler living in your own project required building an absoluteURL. You can now write the path directly:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { - entrypoint: new URL('./src/logger.js', import.meta.url), + entrypoint: './src/logger.js', }, });Paths starting with
./or../are resolved against your project root. Package specifiers such as@org/astro-logger, absolute paths, andURLentrypoints keep working as before.Widens the
AstroPrerendererrender()return type so prerenderers can report incremental-build metadataA prerenderer's
render()may now resolve to either aResponse(as before) or aPrerenderResultobject that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.import type { AstroPrerenderer, PrerenderResult } from 'astro'; const prerenderer: AstroPrerenderer = { name: 'my-adapter:prerenderer', getStaticPaths, async render(request, { routeData }): Promise<PrerenderResult> { const { response, metadata } = await renderInRuntime(request, routeData); return { response, metadata }; }, };This is a non-breaking widening: prerenderers that return a bare
Responsecontinue to work unchanged, and in-process prerenderers can keep returning aResponsesince the build collects their metadata directly.
7.1.6
29 July 2026Patch Changes
Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes
Fixes stale dev CSS after editing component style blocks and CSS files in dev
Adds a feature to
experimental.collectionStoragethat allows to change the size of chunks.For example, you can reduce the size of chunks to 1MB:
// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { collectionStorage: { type: 'chunked', chunkSize: 1024 * 1024, }, }, });
7.1.5
28 July 2026Patch Changes
Fixes a bug where an error while finalizing a request could prevent a response from being sent
Fixes a case where a custom
logger.entrypointfailed to load at runtime in a built server bundle.Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments
7.1.4
27 July 2026Patch Changes
Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (
index.X.cssand_..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.Adds the missing
backgroundprop to the<Image />and<Picture />component types. The prop already worked at runtime, but was absent from the types, causingastro checkto report thatbackgrounddoes not exist on the component propsFixes missing scoped styles for child components inside
client:onlyislands in production builds
7.1.3
20 July 20267.1.2
20 July 20267.1.1
17 July 20267.1.0
16 July 20267.0.9
13 July 20267.0.8
13 July 20267.0.7
8 July 20267.0.6
2 July 20267.0.5
1 July 20267.0.4
30 June 20267.0.3
25 June 20267.0.2
23 June 20267.0.1
23 June 20267.0.0
22 June 20266.4.8
17 June 20266.4.7
15 June 20266.4.6
10 June 20266.4.5
9 June 20266.4.4
3 June 20266.4.3
2 June 20266.4.2
28 May 20266.4.1
28 May 20266.4.0
28 May 20266.3.8
26 May 20266.3.7
21 May 2026