Refactoring image RESTful APIs.