Function DefaultResourcePipeline() adapted.