infer tag template from the extension of the desired filename