API bug fixes in ImagesController