I have a base64 image, and I want to display it in the following dataView
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'nome:ntext',
'img1:ntext', // here is the base64 string that is also accessed by "$ model-> img1"
],
]) ?>
I tried the following code, but it did not work
[
'attribute' => 'img1',
'value' => base64_decode($model->img1),
'format' => ['image', ['width' => '100', 'height' => '100']]
],