title: Yii2 Render an image in DetailView
body: <p>I am trying to render an Image in view file. My code is like below:</p>
  
  <pre><code>&lt;?= DetailView::widget([
          'model' =&gt; $model,
          'attributes' =&gt; [
              'id',
              'name',
              //'photo',
              [
                  'attribute'=&gt;'photo',
                  'value'=&gt;('&lt;img src =' .'uploads/' . $model-&gt;photo . ' height="100" width="100"' .   '&gt;')
              ],
  
  
              [
                  'attribute' =&gt; 'birth_date',
                  'format' =&gt; ['date', 'dd-MM-Y'],
                          ],  
          'mobile',
              ],
  
      ]) ?&gt;
  </code></pre>
  
  <p>Though the code below works:</p>
  
  <pre><code>&lt;?php echo ('&lt;img src =' .'uploads/' . $model-&gt;photo .'&gt;'); ?&gt;
  </code></pre>
  
  <p>Thanks.</p>