M
M
Mikhail Kim2018-08-06 22:30:09
Information Security
Mikhail Kim, 2018-08-06 22:30:09

Is it safe to store and display images in base64?

I am currently writing a wysiwyg editor based on Quill.js. It has the ability to add images from the computer, which are encoded in base64 and inserted into the img tag. How safe is it to store images in base64 in a database (postgres) and also display them to a user on a website? Googling a bit, I found out that the base64 alphabet is limited, which makes sql injection and xss impossible, is that correct?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2018-08-07
@SagePtr

If the pictures are small, then you can store them in base64. If they are ordinary or large, then you should not store them in base64, they will take up more space than if stored in files, and all this will have to be given to the user with each request (the cache will not work on them).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question