Store images in DB, retrieve and store local thumbs