tag = new HtmlTag("img");
tag.addAttribute("src", reference.makeUrl(prefix));
String imageClass = link.getProperty(Link.ImageProperty);
if (imageClass.length() > 0) tag.addAttribute("class", imageClass);
String width = link.getProperty(Link.WidthProperty);
if (width.length() > 0) tag.addAttribute("width", width);
String style = link.getProperty(Link.StyleProperty);
if (style.length() > 0) tag.addAttribute("style", style);
}
else {
tag = new HtmlTag("a", body);