Next.js Discord

Discord Forum

Having issues with importing custom svgs

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
suppose i save the svgs in a .svg format in a folder inside public folder, I faced a ton of errors, I tried using image next(btw am passing through a props and then mapping, but still no good.

Would like to know the correct process to import svgs

5 Replies

Well, how are you doing it right now? Do you need programmatic import of a large number of files? Can you avoid separate svgs and use a sprite sheet instead? Add a bit more details ✨
@not-milo.tsx Well, how are you doing it right now? Do you need programmatic import of a large number of files? Can you avoid separate svgs and use a sprite sheet instead? Add a bit more details ✨
Asiatic LionOP
i managed to make it work using the Next Image for now, i just had an extra ; in the svg all the time and hence the issue :meow_stare:
literally spent 3 hrs debuggin
all code was correct, all methods too...
It happens :meow_party: