private function prepareRouterContext()
    {
        if ($this->generatedRouteHost) {
            $this
                ->router
                ->setContext($this->modifiedContext);

            /**
             * When a Host is set for the image route,
             * we need to change the route context URL.
             */
            $this
                ->router
                ->getContext()
                ->setHost($this->generatedRouteHost);
        }
    }