DEV Community

Anindya Chowdhury
Anindya Chowdhury

Posted on

How do you store the pictures that users have uploaded in your website?

I did a training on Node.js in a company and the trainer there showed us how to convert an image to Base64 and store it into the database. What do you all think about that? Also how do you handle image uploaded to your website?

Latest comments (1)

Collapse
 
dmfay profile image
Dian Fay

Storing images inline in the database can raise hackles, but honestly if you know you aren't going to be dealing with a huge image collection it can't be beat for convenience.

Recently I used Amazon S3 to store images and the getSignedUrl API to generate <img> elements for an internal application.