Next.js Discord

Discord Forum

Images in public folder vs CDN

Answered
Palomino posted this in #help-forum
Open in Discord
Avatar
PalominoOP
I have around 100 images which are less than 5MB combined, should i host them inside my nextjs app in the public folder or serve them from a CDN (supabase storage) and why?
Answered by B33fb0n3
same thoughts here: https://nextjs-forum.com/post/1330301340919791626#message-1330306153019867239 <--- click
As long is everything is suited, there is no need to use an external CDN.
Test it with public folder and if you hit limits, use a CDN
View full answer

6 Replies

Avatar
@Palomino I have around 100 images which are less than 5MB combined, should i host them inside my nextjs app in the public folder or serve them from a CDN (supabase storage) and why?
Avatar
serve them via public folder. If all of your needs suited like that, you can keep that. Else switch to CDN. You'll know why you want to change when your public folder strategie does not work anymore
Avatar
@Palomino how about cost wise? i heard vercel is overpriced when it comes to bandwidth
Avatar
same thoughts here: https://nextjs-forum.com/post/1330301340919791626#message-1330306153019867239 <--- click
As long is everything is suited, there is no need to use an external CDN.
Test it with public folder and if you hit limits, use a CDN
Answer
Avatar
@Palomino solved?
Avatar
PalominoOP
yes, thank you
Avatar
sure thing