Added image inline expansion.

and a few html templates changes.