$response = Yii::$app->getResponse();
$response->headers->set('Content-Type', 'image/jpeg');
$response->format = Response::FORMAT_RAW;
if ( !is_resource($response->stream = fopen($imgFullPath, 'r')) ) {
throw new \yii\web\ServerErrorHttpException('file access failed: permission deny');
}
return $response->send();