diff --git a/leaflet-core.html b/leaflet-core.html
index 630a9b8..5d24321 100644
--- a/leaflet-core.html
+++ b/leaflet-core.html
@@ -635,21 +635,7 @@
if (L.Icon.Default.imagePath) {
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: function() {