0

I apologize in advance if this question is too broad, but it is a pressing issue:

Currently, there is a web application on a virtual machine at work that has a huge amount of pictures. Not only is this bogging down the server, but it is making other tasks very hard to accomplish. Would it be a bad idea to store the images as a string to be later converted into a bitmap? Is there any other way I could go about this to make having these pictures easier on the server?

1 Answers1

0

When it comes to pictures storage, database and web application, I think about only one thing : base64.

It's not pretty efficient though.

You will expand your files by 33% (due to one digit in base64 = 6 bits but coded on a byte in your string). You will have to use Large OBject (LOB), which a database was not created to handle in the first place. Your database server will need more disk space to handle every pictures.

On the other side, base64 allows fast conversion in html (actually, none). Here is a good reference : Embedding Base64 Images

And finally, you can store any binary files the same way (sound or VDO).

Community
  • 1
  • 1
sholan
  • 1
  • 1