Improved the image service.

References #303.