Ligonsker's avatar

Where do I put icons if I use Vite?

Hi,

I am using Laravel 12 + Blade, I currently place all my SVG files inside /public/icons/, and I use them like so:

<img src="/icons/some_icon.svg" alt="Some Icon">

But I am not sure that's how it's supposed to be done.

Is there a better practice? i.e. something like placing them inside the /resources/ folder and compile them?

Thanks

0 likes
1 reply
Snapey's avatar

svgs are not 'compiled', So I dont see the vite relevance.

Personally, I put the svg into blade components so that i can use '<x-icon.trash />' etc

Please or to participate in this conversation.