Words
What the template really needs to be pleasant to use is a chunk of semantically-organised URI space which spits out 301s or 303s to the implementation details:
…kusaba/board/thumb-for/post → …kusaba/board/thumb/thumbnail-filename
…kusaba/board/image-for/post → …kusaba/board/src/fullsize-image-filename
…kusaba/board/thread-for/post → …kusaba/board/res/thread.html (Templates can trivially tack on #post as needed.)
And because MediaWiki is kind of dumb, a hack that lets it pretend everything is a PNG and lets the browser sort out the details with Content-Type:
…kusaba/board/thumb-for/post.png → …kusaba/board/thumb-for/post
With these, it should be possible to write the template to accept as little as {{fanart|post=12345}}.
Pictures