Fixed a bug in image read.

The content type was not being properly set. This has been fixed.

Closes #511