SQLite Forum

Inserting the image as BLOB
Login
Hello,

What programming language are you using?

I have a very similar question, only I need the coding to be done with PHP..

I found (3) techniques that I have been advised with.

First, is to SAVE the image to an "images" folder and only store the filename and file path in your database.

Second is to ENCODE the image using "base64_encode()" and save the DATA as a text field, then DECODE that DATA and using base64_decode() and save it as an image file.

The third option is the one I think you are most interested in and I am still trying to sort out how to save an image file to an SQLITE database BLOB field using PHP.

Check this article:
https://makitweb.com/upload-and-store-an-image-in-the-database-with-php/

If you have an answer, feel free to share..

I hope my response was helpful..