/**
* @param string $relativeMediaPath
* @return string
*/
function getAbsoluteMediaPath($relativeMediaPath) {
/** @var \Magento\Framework\App\ObjectManager $om */
$om = \Magento\Framework\App\ObjectManager::getInstance();
/** @var \Magento\Framework\Filesystem $filesystem */
$filesystem = $om->get('Magento\Framework\Filesystem');
/** @var \Magento\Framework\Filesystem\Directory\ReadInterface|\Magento\Framework\Filesystem\Directory\Read $reader */
$reader = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
return $reader->getAbsolutePath($relativeMediaPath);
}