Make $id in Image::indexAction safe