MatijaL
SVG file versioning
Hi,
I have a small app in production on Fly.io and Cloudflare and all of my assets have a version added to them, e.g. logo-83f2a9a213b74424476fb160bbabaec8.svg?vsn=d except for one; icons.svg, which never gets versioned for some reason. When I update this file, I have to wait until Cloudflare realizes that the file has changed and then it starts serving the new version. I also want to mention that icons.svg file is in the same folder as all the other svg and similar files.
Does anyone have any idea why is this happening and is there a way to fix it?
Marked As Solved
LostKobrakai
What is loaded in the browser depends on how you link those assets, besides the digested and hashed file existing alongside the manifest. Make sure you use the static_path helper or configure and use verified routes correctly wherever you link to that svg.
Also Liked
MatijaL
This is what I’ve been doing so far, yes, I see the problem now.
<svg class="w-8 h-8 ml-4">
<use xlink:href={ ~p"/images/icons.svg#arrow" }></use>
</svg>
Is there a way to replace icons.svg above with versioned file?








