Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/content/docs/en/guides/upgrade-to/v6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,24 @@ import { z } from 'astro/zod';

<ReadMore>See more about [the `astro/zod` module](/en/reference/modules/astro-zod/).</ReadMore>

### SVG rasterization

Astro's default Sharp image service now supports converting SVG files to raster files (such as PNG, WebP, etc.). Note that this is subject to many limitations, for instance SVGs with embedded fonts might not be converted properly.
Comment thread
Princesseuh marked this conversation as resolved.
Outdated

#### What should I do?

If you were previously relying on code like this to automatically skip SVGs:
Comment thread
Princesseuh marked this conversation as resolved.
Outdated

```astro
<Image src={imageThatMightBeAnSvg} format="avif" alt="example" />
```

You'll now need to check the format beforehand to avoid converting SVGs to raster images:

```astro
<Image src={imageThatMightBeAnSvg} format={imageThatMightBeAnSvg.src.format === "svg" ? "svg" : "avif"} alt="example" />
```
Comment thread
Princesseuh marked this conversation as resolved.
Outdated

### Official Astro integrations

All of [Astro's official server adapters](/en/guides/on-demand-rendering/#server-adapters) have also updated to a new major version to accompany the upgrade to Vite v7.0 with Vite's Environment API as the development server and production bundler.
Expand Down