Skip to content

Conversation

@Princesseuh
Copy link
Member

Description (required)

withastro/astro#15180 coming in v6!

@netlify
Copy link

netlify bot commented Jan 12, 2026

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 498eeba
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/696678434c38040008f63f12
😎 Deploy Preview https://deploy-preview-13039--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Jan 12, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/upgrade-to/v6.mdx Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@sarah11918 sarah11918 added 6.0 merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Jan 12, 2026
@sarah11918 sarah11918 added this to the v6.0.0 docs milestone Jan 12, 2026
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great — thanks for taking care of it @Princesseuh!

Left one small nit, but otherwise LGTM.

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Princesseuh ! As a breaking change, this should go in one of the categories below with a full entry below linking to the PR, following the format of the others.

Left some suggestions below as to what that could look like!

Comment on lines +167 to +169
### 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### 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.
### Changed: SVG rasterization
In Astro v5.x, Astro's default Sharp image service was unable to convert SVG files to raster files (e.g. PNG, WebP). This meant that the `<Image />` component would ignore any value set for `format` when optimizing and transforming SVG files.
Astro 6.0 now supports SVG rasterization. This is subject to many limitations, for instance SVGs with embedded fonts might not be converted properly. However, when the `format` property is set, the image service will now attempt to convert SVG images.

Something like this would fit our pattern. Please edit if incorrect or not the most helpful way to describe this!


#### What should I do?

If you were previously relying on code like this to automatically skip SVGs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you were previously relying on code like this to automatically skip SVGs:
If you were previously relying the fact that the image service would automatically skip converting SVGs, you must now check for the format of your images beforehand to avoid converting SVGs to raster images:

Comment on lines +175 to +187
```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 {3}
<Image
src={imageThatMightBeAnSvg}
format={imageThatMightBeAnSvg.src.format === "svg" ? "svg" : "avif"}
alt="example"
/>
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```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 {3}
<Image
src={imageThatMightBeAnSvg}
format={imageThatMightBeAnSvg.src.format === "svg" ? "svg" : "avif"}
alt="example"
/>
```
```astro del={1} ins=(3-7}
<Image src={imageThatMightBeAnSvg} format="avif" alt="example" />
<Image
src={imageThatMightBeAnSvg}
format={imageThatMightBeAnSvg.src.format === "svg" ? "svg" : "avif"}
alt="example"
/>
```
<ReadMore>Learn more about [the `format` image property](/en/reference/modules/astro-assets/#format)</ReadMore>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants