One can store images in SQLite databases as numpy arrays. To convert to a PIL image object into an array:
import numpy as np import Image arr=np.asarray(Image.open('myfile.jpg'),dtype='uint8')
The dtype='uint8' is not truly necessary at this point, but PIL does odd things to the output in the next step when the array is not uint8.
In your model, make the image field a PickleType. It can store the numpy array.
To convert back to the image:
import numpy as np import Image img=Image.fromarray(arr)