db provider - caching images to db