Reference reference = new Reference(translator.translate(link.childAt(0)));
String prefix = link.getContent();
HtmlTag tag;
if (link.hasProperty(Link.ImageProperty) || reference.isImage()) {
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);