Formatting of image referenes