I use Sveltekit and supabase to store my assets for my website. I use the public URL to load files which works fine for JPGs, but when I try to load SVGs the page shows a broken link.
If I manually enter the url of the SVG in the browser it shows the SVG code but not the "visual" version, which is not the case when I enter URLs of static SVG files.
I use sveltekit and this code to display the file, whether it is a JPG or SVG :
//slide.content is loaded from supabase json file+page.svelte<figure><img class={'size-'+ slide.content.asset_type} src={ASSETS_PATH + prjSlug +'/'+ slide.content.filename} alt={slide.content.url} onerror={() => console.error('Error loading image')} /></figure>
I tried various options but none works.
Thanks for your help.