DEV Community

[Comment from a deleted post]
Collapse
 
swizzard profile image
sam

i'd recommend looking into something like AWS S3. you can use a library like Boto to upload the images to S3 and then either store the urls in a database or just use a consistent naming schema to retrieve them later.

Collapse
 
avra profile image
Avra

+1 for this answer especially when handling bigger images. Serving from a filesystem will be more efficient than images stored in a database. This will scale a lot better when your app grows.
I'd argue that if your images are small and will only be looked up occasionally it's OK to store them directly in a database, more so if you don't want to use a separate service for your images.