Can't display image?

This my code, have any wrong?

My image is in base/site/images/




<?php


use yii\helpers\Html;


/* @var $this yii\web\View */

$this->title = 'ข้อปฏิบัติและกฏระเบียบ';

$this->params['breadcrumbs'][] = $this->title;

?>

<div class="site-about">

    <h1><?= Html::encode($this->title) ?></h1>

    <h2 align="center"><?php echo "ค่าใช้บริการสนามแบดมินตัน"; ?></h2>

    <?= Html::img('images/tennis.jpg'); ?>

    <h2 align="center"><?php echo "ค่าใช้บริการสนามเทนนิส"; ?></h2>

    <?= Html::img('images/badminton.jpg'); ?>

</div>



Your ‘images’ folder should be in the same folder your index.php is.

I fixed. Move images folder to app root folder and edit code.




<?= Html::img('images/badminton.jpg'); ?>


to


<?= Html::img(Yii::$app->homeUrl . 'images/badminton.jpg'); ?>



Thank you!