I would recommend storing a link to the file rather than the file itself. Other than that, use BLOBS. I would probably recommend not storing any binary objects in a database for a variety of reasons but if you have to then bytea will work, assuming they are smaller than 2gb.
Thanks,
- Ben
On Wed, Dec 15, 2021, 4:41 PM Bruce Momjian <bruce@momjian.us> wrote:
On Wed, Dec 15, 2021 at 02:45:15PM -0300, Estevan Rech wrote: > Hi, > > I don't currently use PostgreSQL, but I plan to migrate and I have a question > about the best way/strategy for storing images. I have about 2 million images > with a growth trend of around 1 million images per year. I plan to store in > bytea format in an isolated table. Is this recommended? Is there another better > way?