fix templates for images