Next.js Discord

Discord Forum

fix `import` mayhem

Answered
piscopancer posted this in #help-forum
Open in Discord
I have 30+ gifs in the assets folder to pick only one of them randomly and show as logo of the site.

It may look fun, but I have to manually keep track of the files names and import them in the component one by one. Can I avoid static imports so as to simplify this process?
Answered by joulev
Correct. Put them in the public folder
View full answer

4 Replies

Yeah nothing wrong with <img src="/logos/logo1.gif">. I don’t think next/image supports gif
ok, gotta try
but they have to be put inside public folder to be accessed, or the src="/src/assets/girls/0.gif" cannot be valid, for these assets to belong on the server
Answer