Wrong content type served on SVG files through Imgix



at AREA 17, we are using Imgix for all our images, including SVGs (just to benefit from the CDN because they don’t process SVG). We started experiencing errors from their part on a subset of files, which they immediately fixed. But the underlying error seem to be on Fastly: serving the wrong Content-Type.

https://area17.imgix.net/4e0b9edf-d2ed-4237-bbdf-3aa57d93d90f/logo_2015_red-bull-studios-new-york_02.svg is served as text/plain

https://area17.imgix.net/9f43c839-46ad-4168-9b08-b241b65f769d/logo_2015_red-bull-studios-new-york_02.svg, the exact same source file, is served as image/svg+xml.

For info, here are the headers from the source file on S3:

Imgix did not provide any update on this yet so I’m trying here just in case someone experienced it when working with Fastly directly.



Hey Quentin

Can’t say that I have come across the serving of a wrong Content-Type or switching between what has been defined and another Content-Type from the same subset of files. We’ll reach out to Imgix on our end also and see if there is anything funny happening between Imgix talking to Fastly and vice versa.


We are still getting the issue.
For example this image is returned as text/plain so the browser simply don’t display it : https://area17.imgix.net/9f43c839-46ad-4168-9b08-b241b65f769d/logo_2008_alli_02.svg

Any update on that front ?


Hey mr_doinel,

Sorry for the radio silence. As originally thought Fastly will respect the Content-Type header received from any of our customers origins. Our flexibility does allow for updating headers such as the Content-Type header. Unfortunately I cannot comment on any customer’s particular configuration. I would recommend contacting the service to see if they have any further insight on this issue.