Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/loud-brooms-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/netlify': patch
---

Fixes an issue with SVGs not rendering with image-cdn enabled, due to invalid source path parsing.
6 changes: 6 additions & 0 deletions packages/integrations/netlify/src/image-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ function removeLeadingForwardSlash(path: string) {

const service: ExternalImageService = {
getURL(options) {
// For SVG files, return the original source path
if (isESMImportedImage(options.src) && options.src.format === 'svg') {
return options.src.src;
}

// For non-SVG files, continue with the Netlify's image processing
const query = new URLSearchParams();

const fileSrc = isESMImportedImage(options.src)
Expand Down
Loading