elem.src = "C:\\Users\\name\\AppData\\Roaming\\Anki2\\addons21\\ChessAddon\\user_files\\B.png"; I get an error message saying:
“Not allowed to load local resource: file:///C:/Users/name/AppData/Roaming/Anki2/addons21/myaddon/user_file/B.png”
When using a relative path like this:
elem.src = "/user_files/B.png";, asumming the script is run in the root of the addon directory, I get the following error message:
GET htttp://127.0.0.1:63465/user_files/B.png 404 (NOT FOUND).
(Had to add a third t so its not a link and lets me post this. It’s http.)
The way I load the Front.html file is like this:
This seems to be working because I can see everything except for the images. Also when I open the Front.html file in a browser everything works fine and the images get loaded.
I have been searching for a solution for hours now. If anyone has any idea on how to load the images or knows what the problem, please let me know. Any help would be greatly appreciated.