Closed cornzz closed 1 year ago
Hi @cornzz
I think this is a viable addition so I've already added it. Install the latest version and you will be able to generate inline data URLs by appending ?dataurl
to your imports, e.g. import icon from './my-icon.svg?dataurl'
.
Hi, I found this plugin hoping that it would allow me to import small svg icons as data url strings which I could directly use as the source of
img
tags, but was disappointed when I found that it does not allow that (or am I missing something? maybe there is an svgo option for this?) So I guess this is a feature request, would this be possible? Before sveltekit I was using this rollup plugin to achieve the same: https://www.npmjs.com/package/@rollup/plugin-image