Fixes #5358 Fixed ImageAttribute usage in templates. Added special %% string start for template values