how to display images stored in pub/media folder

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

methode 1

<p><?php echo __('image') ?>: <img src="<?= $user->getImg() ?>" alt="image" /></p>
        

methode 2

$pathmedia = "pub/media";
<img src="<?php echo $block->getUrl($pathmedia."/".$user->getImg())?>"/>