diff --git a/src/content/docs/en/guides/upgrade-to/v6.mdx b/src/content/docs/en/guides/upgrade-to/v6.mdx index 8c769ce590e1a..5769b05dcc1a6 100644 --- a/src/content/docs/en/guides/upgrade-to/v6.mdx +++ b/src/content/docs/en/guides/upgrade-to/v6.mdx @@ -1190,7 +1190,7 @@ import myImage from '../assets/photo.jpg'; -In Astro 5.0, the default image service would upscale images when the requested dimensions were larger than the source image. +In Astro 5.x, the default image service would upscale images when the requested dimensions were larger than the source image. Astro 6.0 removes this behavior: the default image service never upscales images. @@ -1198,6 +1198,30 @@ Astro 6.0 removes this behavior: the default image service never upscales images Review your images and update dimensions as needed. If you do need to upscale images, you may consider upscaling the images manually or using a custom image service that supports upscaling. +### 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 `` 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](https://github.com/lovell/sharp/issues?q=is%3Aissue%20state%3Aopen%20svg), 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. + +#### What should I do? + +If you were previously relying on the fact that the image service would automatically skip converting SVGs, you must now check the format of your images beforehand to avoid converting SVGs to raster images: + +```astro del={1} ins=(3-7} +example + +example +``` + +Learn more about [the `format` image property](/en/reference/modules/astro-assets/#format) + ### Changed: Markdown heading ID generation