The issue was that this tile provider serves images in jpg format, but the URLs do not include a file extension (e.g. https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/5/14/17) and usvg uses the file extension to infer the image type. This PR adds logic to infer the image type from the Content-Type header and use that to build a file extension that usvg is happy with.
Closes #162
The issue was that this tile provider serves images in jpg format, but the URLs do not include a file extension (e.g. https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/5/14/17) and usvg uses the file extension to infer the image type. This PR adds logic to infer the image type from the
Content-Type
header and use that to build a file extension that usvg is happy with.cc @binste