Matt Luo
Matt Luo2mo ago

Does Vercel charge bandwidth for Convex images?

My team’s building a messaging aspect to our Next.js app and this question came up: We’re pretty confident that Vercel bandwidth is charged for images in the /next directory. These are images distributed throughout the Vercel CDN. But do images in convex (file storage) get charged for Vercel bandwidth when displayed on the front end?
3 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
hasanaktasTR
hasanaktasTR2mo ago
In Nextjs, images are optimized by default and served by itself. Therefore, you will be charged additionally in Vercel. You should use unoptimized prop for image component or set unoptimized to true globally in the next config file. The most logical scenario is to serve images via convex from the http api and cache them via cloudflare. This way, you can significantly reduce costs and quickly access images from all over the world. You should keep in mind that in Convex, every storage request costs money. So if you are going to have a lot of image access, you should use an intermediate solution like cloudflare. Convex team was working on a cdn but I don't know if anything has been developed yet.
Matt Luo
Matt LuoOP2mo ago
I see, thanks hasanktasTR