public function render(ImageInterface $image = null, $width = null, $maximumWidth = null, $height = null, $maximumHeight = null, $allowCropping = false, $allowUpScaling = false, $async = false, $preset = null)
{
if ($image === null && $this->hasArgument('asset')) {
$image = $this->arguments['asset'];
}
if ($image === null) {
return '';
}
if ($preset) {
$thumbnailConfiguration = $this->thumbnailService->getThumbnailConfigurationForPreset($preset, $async);
} else {
$thumbnailConfiguration = new ThumbnailConfiguration($width, $maximumWidth, $height, $maximumHeight, $allowCropping, $allowUpScaling, $async);
}
return $this->assetService->getThumbnailUriAndSizeForAsset($image, $thumbnailConfiguration, $this->controllerContext->getRequest())['src'];
}