diff --git a/_test/tests/inc/fulltext_mediause.test.php b/_test/tests/inc/fulltext_mediause.test.php
index 9d5b2dc84fafba6d5596c3ee31f5bfaf9358a3a5..503b8bc84d725d9889a78b8eb482ca9ac4051256 100644
--- a/_test/tests/inc/fulltext_mediause.test.php
+++ b/_test/tests/inc/fulltext_mediause.test.php
@@ -26,6 +26,13 @@ class fultext_mediause_test extends DokuWikiTest {
         $this->assertEquals(array('test:medialinks'), ft_mediause('test:example.png'));
     }
 
+    public function test_media_in_local_links() {
+        saveWikiText('test:locallinks', '[[#test|{{wiki:logolocal.png}}]]', 'Test init');
+        idx_addPage('test:locallinks');
+
+        $this->assertEquals(array('test:locallinks'), ft_mediause('wiki:logolocal.png'));
+    }
+
     public function test_media_in_footnotes() {
         saveWikiText('test:media_footnotes', '(({{footnote.png?20x50}} [[foonote|{{:footlink.png}}]]))', 'Test initialization');
         idx_addPage('test:media_footnotes');
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 437559370e248d61cee1aad6f0c961049bd03529..8ba159d62d6c1b238ae8d14976f2819cf3e4187b 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -274,7 +274,12 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         $this->internallink($link, $link);
     }
 
-    function locallink($hash, $name = null){}
+    function locallink($hash, $name = null){
+        if(is_array($name)) {
+            $this->_firstimage($name['src']);
+            if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+        }
+    }
 
     /**
      * keep track of internal links in $this->meta['relation']['references']