0
In a Java web application, what better way to store images? Store in databases or image folders and in the database use paths to these images? And how would you do that?
Thinking of using write in the database, would use the Base64
java, for future manipulation.
I did a test once with bank, I had the problem of slowing down when calling the querys with a lot of data, then I had to outsource the Blob to a table the part of the image data table, after that I always use external saving, facilitates data recovery, and if it is an image, it makes it easier to upload it, because you will have the components call the url you will send as an attribute, and it is even easier to manage migration if you split the file and server url context
– Weslley Barbosa
@Weslleybarbosa was weighing in using in the database for the String Base64 image
– Tiago Ferezin
It is not a good practice, until pq vc will have to load a list of objects that contain a gigantic string of Base64, and if by chance a component does not support, vc will need to convert, if you send only the url, the page will be able to load the information first and make an independent call to load the image from the url
– Weslley Barbosa