I have a server running Nginx with the Google Pagespeed module installed.
Up until recently, I had no issues with SVGs on my website, however now Chrome is giving me the error: Failed to load resource: net::ERR_CONTENT_DECODING_FAILED
The image is located in: /images/bg.svg
Manually loading the image with a random query parameter ie. bg.svg?v=2 loads the SVG normally without errors so perhaps it's a caching issue.
How can I go about troubleshooting this problem?
Have a look at the discussion behind this link https://github.com/pagespeed/ngx_pagespeed/issues/1346
Same error is discussed as a ngx_pagespeed issue. Solution that worked for me was adding this to my nginx config:
More info about it: https://modpagespeed.com/doc/restricting_urls