Support for storing and retrieving images in DB