Fix resource twig extension

Is this method really needed ?