CodeExplorer getTypeOfImage example
$sizes =
array_map(function D
$size) { $parts =
explode('x',
$size);
return [ 'width' =>
$parts[0
],
'height' =>
$parts[1
],
];
},
$sizes);
if (isset($sizes[$imageSize])) { $type =
$this->
getTypeOfImage($hash);
$thumbnails =
$thumbnailManager->
getMediaThumbnails($fileName,
$type,
$extension,
[$sizes[$imageSize]]);
if (empty($thumbnails)) { return '';
} return $this->
fixShopHost( $mediaService->
getUrl($thumbnails[0
]['source'
]),
$mediaService->
getAdapterType() );
}