diff --git a/leaflet-core.html b/leaflet-core.html
index 1fa580c..d1a6b79 100644
--- a/leaflet-core.html
+++ b/leaflet-core.html
@@ -648,20 +648,7 @@
return;
}
- var scripts = document.getElementsByTagName('link'),
- leafletRe = /[\/^]leaflet-map.html$/;
-
- var i, len, src, matches, path;
-
- for (i = 0, len = scripts.length; i < len; i++) {
- src = scripts[i].href;
- matches = src.match(leafletRe);
-
- if (matches) {
- path = src.split(leafletRe)[0];
- L.Icon.Default.imagePath = (path ? path + '/' : '') + '../leaflet/dist/images';
- }
- }
+ L.Icon.Default.imagePath = this.resolveUrl('../leaflet/dist/images');
}
domReady() {