hello everyone I want to display an image from the folder "pub/media" and concatinate it with my path from the image field from database but I can't display it in detail page with the ways that I have tested
can anyone help me please
this is what I have done with 2 ways
method 1
<p><?php echo __('image') ?>: <img src="<?= $user->getImg() ?>" alt="image" /></p>
method 2
$pathmedia = "pub/media";
<img src="<?php echo $block->getUrl($pathmedia."/".$user->getImg())?>"/>