Support graphics insertion.

Add image insertion example. Bug fixes.