Move image resource references into template