---
title: Use content-type of response to trigger image optimization
summary: Typically requests are flagged for IO before they are sent to a backend, but using a restart in VCL, you can inspect a response before deciding whether to optimize it.
url: https://www.fastly.com/documentation/solutions/examples/io-response-content-type
---

Typically requests are flagged for IO before they are sent to a backend, but using a restart in VCL, you can inspect a response before deciding whether to optimize it.

## VCL

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/d63629eb)

