This page demonstrates the ability to send only images to Image Optimization and leave other files such as HTML, CSS, and PDFs.
Click here to download the Fastly PDF
sub vcl_recv { #FASTLY recv // Return non-image if (req.url.path !~ "(?i)\.(?:jpg|png)$" || req.url.path !~ "/images/") { return(lookup); } // Send the request to the IO set req.http.X-Fastly-Imageopto-Api = "fastly"; }
//facepug.io/images/a2/pug-life.jpg?crop=660:438&width=660 //facepug.io/images/Fastly.pdf