Answer the question
In order to leave comments, you need to log in
What is the best way to store images in a database?
The question is. Decided to write a small bulletin board. There was a problem saving images in the database. Started saving paths to images. What is the best way to save images to minimize disk consumption? I write in Php, Laravel
Answer the question
In order to leave comments, you need to log in
I already did this to write to the database, I had to encode the pictures through base_64, then decode, then stream to the page. More crap and extra load on the base, it was lucky that the base was rubber.
If you have pictures of 3 meters, then your page will take longer to load, and besides, this page will be immediately thrown out of the search. It's better to do as you were told, get the optimization of the images and save them in the FS, but it's better to cut one more picture for each resolution. So that one picture is for example: 300x200, 150x150... (Depending on what sizes of images you have on the page)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question