Moved image persisting to ImageService.

Addressed to #132

No functional changes.