Implement image and figure rendering.