Nextjs14 app router import local image from public folder not working
Answered
Crazy ant posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Crazy antOP
Hello, I am unable to import local images from public folder. My import looks as below
But import fails when I build the app. Please help.
import Avatar from "../../public/images/Avatar.png"
, it works in local. But import fails when I build the app. Please help.
Answered by joulev
https://nextjs-faq.com/module-not-found-due-to-case-sensitivity most likely it's due to wrong capitalisation
4 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
https://nextjs-faq.com/module-not-found-due-to-case-sensitivity most likely it's due to wrong capitalisation
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Crazy antOP
So do I need to change image file name as avatar.png
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
it could be aVatar.png, it could be you named your folder Public. you need to check your file names on github
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
Crazy antOP
@joulev , Thanks. It works.