Next.js Discord

Discord Forum

Optimal way to use svg icons

Unanswered
Shayokh posted this in #help-forum
Open in Discord
Hello, I am currently building an application where there is expected to be a lot of svg icons being rendered. My question is what is the better way to bring and render svgs in Nextjs applications.

should I just install the svg icons locally and import them from filesystem?

or should I import them directly from my choosen library, like lucide react for example.

import { Smile } from "lucide-react";


Which is one will result in better performance for the app? Also which approach is usually followed in big, production ready codebases?

2 Replies

Original message was deleted
As I mentioned, Lucide-react
I mostly use that library for production apps