Added REST interface to images & fixed it