We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caf8573 commit 704b585Copy full SHA for 704b585
packages/image/src/image-loaders.ts
@@ -35,6 +35,11 @@ export const wsImageLoader: ImageLoader = (props) => {
35
src = src.slice("/cgi/asset".length);
36
}
37
38
+ // Route SVGs through /cgi/asset/ to avoid image optimization
39
+ if (src.toLowerCase().endsWith(".svg")) {
40
+ return `/cgi/asset/${encodePathFragment(src)}`;
41
+ }
42
+
43
const resultUrl = new URL("/cgi/image/", NON_EXISTING_DOMAIN);
44
45
if (props.format !== "raw") {
0 commit comments