41424344454647484950515253545556575859 if(!isset($dotParts[1])){
throw new \yii\web\HttpException(404, 'Image must have extension');
}
$dirtyAlias = $dotParts[0];
$size = isset(explode('_', $dirtyAlias)[1]) ? explode('_', $dirtyAlias)[1] : false;
$alias = isset(explode('_', $dirtyAlias)[0]) ? explode('_', $dirtyAlias)[0] : false;
$image = $this->getModule()->getImage($item, $alias);
if($image->getExtension() != $dotParts[1]){
throw new \yii\web\HttpException(404, 'Image not found (extenstion)');
}
if($image){
header('Content-Type: image/jpg');
echo $image->getContent($size);
}else{
throw new \yii\web\HttpException(404, 'There is no images');
}