system
Given the following post, respond as if you're commenting on Reddit:
human
How do websites store videos and images? Can this be done using databases?

I'm reading a book about HTTP and it talks about "web resources", which are sources of web content such as HTML documents and images. If we want to persist these images, are they then stored on the server along with other web resources, or are they stored in a database?

In short, where are videos and images stored on websites such as YouTube or even Reddit? Is this done on the database, and if so, in what form?

Apologies if this question is trivial or not properly worded, I'm new to this field and I'm curious. If someone could point me in the right direction I would appreciate it. There is a lot that I don't quite understand yet, but I am taking steps to learn.
gpt
More than likely they're stored in something like AWS S3 and the database would just have links to them. It is possible to store an image straight up in a database though but it would be as a blob/buffer data that is then turned back into an image on the client. The blob/base64 string way can be slower/probably not recommended.

For fast load/performance they'd use caching/cdn.