How do I display an (svg) image?

Hello.

I am trying to display an image (.svg) using p5.js

I saw this example site: p5js.org/examples/image-load-and-display-image.html and tried using that code.

However, I'm getting an error saying: "Access to Image at 'file://blabla/bla/snowflake.svg' from origin 'file://' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access."

(I read on the example site above that I need to use a local server.)

Is there any way to do this without using a local server, and without changing my browsers policies? (I know it can be done using regular HTML 5 Canvas JS, so I'm thinking P5.js should be able to do it too?)

Thanks in advance.

Answers

This discussion has been closed.