Moved controller method for getting image to ResourcesController.