title: Display images with different extensions Yii2
body: <p>Please, help me to display images with different extensions.</p>
  
  <p>Here is my code to display </p>
  
  <pre><code>&lt;?php
          foreach ($users as $arr) {
              $imageName = $arr-&gt;username;
              $extension = 'jpg';
          ?&gt;
          &lt;div class="col-sm-6 col-md-4"&gt;
              &lt;div class="thumbnail"&gt;
                  &lt;?= Html::img('/uploads'.'/'.$imageName.'.'.$extension, ['class' =&gt; 'img-rounded', 'style' =&gt; 'width: 300px; height: 250px'])   ?&gt;
  </code></pre>
  
  <p>This code displaying only 'jpg' images, and i need to display for e. 'jpg','png'.</p>