I've made an example leaflet project using a custom icon loading an image from the internet:
https://jsfiddle.net/dvdjsph/v30vL109/
As soon as I try to load something from my hard drive, however, the image won't load. This is how I'm trying to load it.
var offerIcon = new OfferIcon(
{ iconUrl: "C:\image.jpg"});
L.marker([0, 0], {icon: offerIcon}).addTo(markers).bindPopup(name);
I know that JS fiddle won't load this -- it's on my hard drive. I just put up the example to show that, minus that path, everything else is working fine.
Is there something I'm missing about paths with Leaflet?
EDIT:
At Matej's suggestion, I tried putting an icon in the same folder as my template and referencing it like so:
var offerIcon = new OfferIcon(
{ iconUrl: "image.jpg"});
Still not working.