Well just tried add custom server response header for svgz
file extension, and it does work .
I tested both on Google Chrome and Firefox, both display the svgz
via img
and object
.
The extra config:
# config.toml
[server]
[[server.headers]]
for = '*.svgz'
[server.headers.values]
Content-Encoding = 'gzip'
Vary = 'Accept-Encoding'
[mediaTypes."image/svg+xml"]
suffixes = ["svg","svgz"]
But here i made test repo:
Hugo Server Response config docs: