SVG support #387
Unanswered
GarethLangleyQuitGenius
asked this question in
Q&A
SVG support
#387
Replies: 2 comments 4 replies
-
I would think an svg would normally be smaller than a webp, so there wouldn't be much point in that? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Have you tried to set the following imagetools config? // vite.config.js
// ...
return defineConfig({
// ...
plugins: [
imagetools({
include: [
'**/*.{heic,heif,avif,jpeg,jpg,png,tiff,webp,gif,svg}', // svg added
'**/*.{heic,heif,avif,jpeg,jpg,png,tiff,webp,gif,svg}?*', // svg added
],
}),
],
// ... vite v4.1.4 building for production...
✓ 304 modules transformed.
../dist/index.html 0.47 kB
../dist/assets/logo-7d9f048f.webp 8.83 kB # this was a complex 152KiB svg that was already optimized by svgo |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does this library support converting svgs to webp? I cannot see anything in the docs that specifies what file types can be converted.
Beta Was this translation helpful? Give feedback.
All reactions