-
Case Using ImageSharp.Web We can server jpg images like this: http://example.com/img/pic1.jpg?width=10 SVG I would like to request SVG images on the same path like this: http://example.com/img/logo.svg This will result in a 404 response 😔 How do I configure ImageSharp just to bypass all logic and retur the original SVG file? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
That shouldn’t happen. Did you register the middleware after the static file middleware or something? |
Beta Was this translation helpful? Give feedback.
-
Please note that the base path "http://example.com/img/" is the same for both jpg and svg files. Otherwise it's a quite basic setup:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for pitching in @tocsoft I'm wondering whether it would be preferable for me to write a custom "component" for ImageSharp that will read the SVG file and just serve the original file in the same way a jpg file is handled when no query string parameters are present. Got any recommendations or pointers to share? |
Beta Was this translation helpful? Give feedback.
-
Thanks you both - hacking ImageSharp to our needs seems a bad way to go. |
Beta Was this translation helpful? Give feedback.
Thanks for pitching in @tocsoft
You are right - the svg files are in the same blob storage.
Your explanation on how ImageSharp i architected make perfect sence.
I'm wondering whether it would be preferable for me to write a custom "component" for ImageSharp that will read the SVG file and just serve the original file in the same way a jpg file is handled when no query string parameters are present.
Got any recommendations or pointers to share?