fixed image handling (template)