Store images in the database in a more sane way