this has already been discussed, but i don't remember in which post.
if you want to put an image in a DB, you have to store it in a BLOB type field.
and when retrieving vite, you have to prepare the header of your file so that it is recognized as a picture.
again, the best is to store the picture outside of the DB and store the path to this picture in the DB.