emcee icon indicating copy to clipboard operation
emcee copied to clipboard

Image asset urls

Open kretz opened this issue 11 years ago • 2 comments

I'm using the leaflet-map web component ("leaflet-map": "nhnb/leaflet-map#master" in bower). It is working well for js and css, so the maps and colors are correct.

However, there are markers on the map which make use of images. Those paths point to <img src="../leaflet/dist/images/marker-icon-2x.png"> which do not exist. Instead, Rails asset pipeline actually makes the image available on /assets/marker-icon-2x.png.

Sure, changing the path in the web component can be done, but that kind of defeats the purpose of reusable web components.

How should image paths in web components be declared so they work in all frameworks?

kretz avatar Sep 18 '14 11:09 kretz

I should also add that the image is also available on /assets/leaflet/dist/images/marker-icon-2x.png.

kretz avatar Sep 18 '14 12:09 kretz

Hey, thanks for raising the issue. I never thought about how images would figure into web components. Not sure the best way to handle this, but I'll take some time on Sunday to look into this some more.

ahuth avatar Sep 20 '14 01:09 ahuth