updated metadata stored in the cms

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>
updated saving images to the db

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>