fix document viewer support for images

fixes #49