public function resize(ImageInterface $imageMedia, array $options)
    {
        $this->prepareRouterContext();

        $absoluteUrlOption = isset($options['absolute_url'])
            ? $options['absolute_url']
            : false;
        $routeReferenceType = $this->getReferenceType($absoluteUrlOption);

        $generatedRoute = $this
            ->router
            ->generate($this->imageResizeControllerRouteName, [
                'id' => (int) $imageMedia->getId(),
                'height' => (int) $options['height'],
                'width' => (int) $options['width'],
                'type' => (int) $options['type'],
                '_format' => $imageMedia->getExtension(),
            ], $routeReferenceType);

        $this->fixRouterContext();

        return $generatedRoute;
    }
public function resize(ImageInterface $imageMedia, array $options)
    {
        $this->prepareRouterContext();

        $absoluteUrlOption = isset($options['absolute_url'])
            ? $options['absolute_url']
            : false;
        $routeReferenceType = $this->getReferenceType($absoluteUrlOption);

        $generatedRoute = $this
            ->router
            ->generate($this->imageResizeControllerRouteName, [
                'id' => (int) $imageMedia->getId(),
                'height' => (int) $options['height'],
                'width' => (int) $options['width'],
                'type' => (int) $options['type'],
                '_format' => $imageMedia->getExtension(),
            ], $routeReferenceType);

        $this->fixRouterContext();

        return $generatedRoute;
    }
public function resize ( ImageInterface $ imageMedia , array $ options ) { $ this -> prepareRouterContext ( ) ; $ absoluteUrlOption = isset ( $ options [ 'absolute_url' ] ) ? $ options [ 'absolute_url' ] : false ; $ routeReferenceType = $ this -> getReferenceType ( $ absoluteUrlOption ) ; $ generatedRoute = $ this -> router -> generate ( $ this -> imageResizeControllerRouteName , [ 'id' => ( int ) $ imageMedia -> getId ( ) , 'height' => ( int ) $ options [ 'height' ] , 'width' => ( int ) $ options [ 'width' ] , 'type' => ( int ) $ options [ 'type' ] , '_format' => $ imageMedia -> getExtension ( ) , ] , $ routeReferenceType ) ; $ this -> fixRouterContext ( ) ; return $ generatedRoute ; }
Return route of image with desired resize.

@param ImageInterface $imageMedia Imagemedia element
@param array          $options    Options

@return string image route
Return route of image with desired resize .