Reputation: 1
I'm trying to move from gulp to Vite + Vituum using Pug, Sass and WebP images. On Gulp I used to convert any new images (png or jpg) to WebP and call it directly on pug. But I can't find a way to convert images to webp and use then on the dev server like img(src='/assest/logo.webp')
or <img src="/assest/logo.webp">
. I can only use the original image file so it show on the browser. Is there any way to accomplish what I want or maybe change the ext of the image path on build?
How can I convert png images to webp and use then on the dev server using vite?
Upvotes: 0
Views: 142