How can I store images for free?
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
My project uses some gen ai model API and generates an image based on the prompt provided by the user.
I am going to use Next, nextAuth (google), NeonDB (free tier) and Prisma.
I want to store images generated by each user, along with the prompt. (for showing users their history).
Can I store those images in NeonDB? If, not, any generous free-tier solution for this?
Image generated is about 80-100KBs.
A user can generate around 40 images.
And there will be around 80-100 people.
So thats around 500MB data.
I am going to use Next, nextAuth (google), NeonDB (free tier) and Prisma.
I want to store images generated by each user, along with the prompt. (for showing users their history).
Can I store those images in NeonDB? If, not, any generous free-tier solution for this?
Image generated is about 80-100KBs.
A user can generate around 40 images.
And there will be around 80-100 people.
So thats around 500MB data.
19 Replies
Transvaal lion
Cloudinary has a generous free tier to store images (and other files). Alternatively I think you might be able to store images as Base64 in your DB.
@Transvaal lion Cloudinary has a generous free tier to store images (and other files). Alternatively I think you might be able to store images as Base64 in your DB.
Dwarf CrocodileOP
if I do base64 encoding, won't this increase the file size?
like if 1 image is 100kb, its base64 would be more than 100KBs, right?
Transvaal lion
Not sure about that tbh
Dwarf CrocodileOP
and what about the query speed?
@Transvaal lion Not sure about that tbh
Dwarf CrocodileOP
me neither, just asking 😅
@Dwarf Crocodile if I do base64 encoding, won't this increase the file size?
Dwarf CrocodileOP
GGs
@Transvaal lion Cloudinary has a generous free tier to store images (and other files). Alternatively I think you might be able to store images as Base64 in your DB.
Dwarf CrocodileOP
i was also thinking about these 2 options
so cloudinary it is
@Dwarf Crocodile so cloudinary it is
there's also cloudflare R2 which provides a S3 compatible API
cloudflare r2 is good and cheap, i recommend it
Dwarf CrocodileOP
which will be easier to integrate in my project, cloudflare or cloudinary?
Transvaal lion
If you just need to upload images from your API, I think both should be equally simple to integrate, as both have an SDK / a client library
It'll cost you a lot and it takes a lot of time to fetch it, its better to use
@Dwarf Crocodile which will be easier to integrate in my project, cloudflare or cloudinary?
If you are looking for a platform for quick integratoin, you can check: https://uploadthing.com/
Cloudflare R2 is cheap & good, but yes, you just won't get good customer support even for account and billing issues, they'd take 10-20 days to reply on free plan.
most of the time it'll not be needed
most of the time it'll not be needed
Dwarf CrocodileOP
For context:
Based on users prompt, an image will be generated.
I am storing user details, prompt, imageUrl, createdAt and stuff.
But imageUrls will expire in 2days. So i need to save my images on some cloud storage. (so that i can see what images were generated by model)
Based on users prompt, an image will be generated.
I am storing user details, prompt, imageUrl, createdAt and stuff.
But imageUrls will expire in 2days. So i need to save my images on some cloud storage. (so that i can see what images were generated by model)