Thanks for your answers.
The template wrapper that you suggested as an alternative for a single-sign-on API is no option sadly.
And the image-preview is meant to be displaying in the thread list of a forum view, not the thread view. Sorry for my inaccurate description.
So, any other...