I would like to display more related products of a product in my Magento 2 product page. with the following code, I can successfully get part of the path of a product image.
$related_products = $objectManager->get('Magento\Catalog\Model\ResourceModel\Product\Collection')
->addAttributeToFilter('sku', array('like' => substr($_product->getSku(),0,8) .'%'))
->addFieldToFilter('type_id','configurable');
foreach($replated_products as $relatedproduct){
echo $relatedproduct->getImage();
}
this code will output something like /2/0/2050-101-9884.jpg, But how can I display it as a image? I haven't been able to find out how to get the full image path.