Store images in MongoDB

`$rootScope` is injected into the controller but never used