Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Using supabase storage works with JPG but not with SVG for my website

$
0
0

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.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>