convert image dict to a string when storing