Wicket has an feature to automatically convert static references in the HTML markup to dynamic links.
To only convert some references to dynamic links, surround the HTML markup parts by <wicket:link>...</wicket:link> tags:
To convert all links in all markups, set the corresponding property in the markup settings:
Unfortunately, it seems not to work out-of-the-box when the reference points to static resources outside the WEB-INF/classes/ directory. For a work-around, please take a look at WICKET-581.