Added basic db saving for images