TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext();
linkTemplateContext.set("class", imageClass);
if (image.isInserted()) {
linkTemplateContext.set("src", "/" + image.getKey());
TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext();
linkTemplateContext.set("class", imageClass);
if (image.isInserted()) {
linkTemplateContext.set("src", "/" + image.getKey());