Getting Image from directory and show in frontend phtml MAGENTO2
From Admin When image uploaded it saves the only path of the image. After getting collection get the path. After that <div class="magzainListing"> <ul> <?php $objectManager = \Magento\Framework\App\ObjectManager:: getInstance (); $body = $objectManager -> get ( 'Custom\module\Model\ResourceModel\Magazineinfo\Collection' )-> setOrder ( 'id' , 'ASC' );; ?> <?php foreach ( $body as $content ) { $con = $content -> getBlogContent (); $image = $content -> getBlogImage (); ///Image Path $title = $content -> getBlogTitle (); $storeManager = $objectManager -> get ( 'Magento\Store\Model\StoreManagerInterface' ); $magimage = $storeManager -> getStore ()-> getBaseUrl (\Magento\Framework\UrlInterface:: URL_TYPE_MEDIA ); $imageUrl = $magimage . '/upload/images/' . $image ; //////// Folder==>> upload/image ///////// ?> ...