sjafferi / svelte-images

A Svelte component for displaying images
MIT License
21 stars 5 forks source link

String contains invalid character #8

Closed mylastore closed 3 years ago

mylastore commented 3 years ago

When I do this <img {...image} I get this error Sveltekit current latest version with node adapter as soon as I remove {...image} images show but modal wont work. Could it be that my images src is a complete url "http://localhost:8000/60d40acab7f2ee0a97c7515a/slide-2.jpg"?

What is the modal expecting?

Uncaught (in promise) DOMException: String contains an invalid character
mylastore commented 3 years ago

Ok figure this error "String contains invalid character", so the svelte-images is expecting src: "some/image/url.png" my array of images contain the code below so that would not work since it does not container src: .

{"images":["http://localhost:8000/60d40acab7f2ee0a97c7515a/slide-2.jpg","http://localhost:8000/60d40acab7f2ee0a97c7515a/slide-1.jpg","http://localhost:8000/60d40acab7f2ee0a97c7515a/slide-4.jpg","http://localhost:8000/60d40acab7f2ee0a97c7515a/slide-3.jpg"],"_id":"60d40acab7f2ee0a97c7515a"}