Enabling Image optimization

Difficulty level: Beginner


Fastly offers an image optimizer which can perform transformations on images that pass through Fastly servers. In this challenge, we send two requests, one for an image, at /image/png, and one for a non-image resource, at /anything.

Write code that makes the image request pass through the image optimizer, but does not route the non-image request through it.

Try this challenge now

For a guide to how challenges work see getting started.

User contributed notes


Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact support@fastly.com)