Pentru a obține diferitele tipuri de URL într-un bloc Magento 2, injectează StoreManagerInterface prin constructor (evită ObjectManager::getInstance(), care este un anti-pattern).
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\UrlInterface;
// ... injectat ca $this->storeManager
$store = $this->storeManager->getStore();
$baseUrl = $store->getBaseUrl(); // base URL
$mediaUrl = $store->getBaseUrl(UrlInterface::URL_TYPE_MEDIA); // media
$staticUrl = $store->getBaseUrl(UrlInterface::URL_TYPE_STATIC); // static
$linkUrl = $store->getBaseUrl(UrlInterface::URL_TYPE_LINK); // link
În template poți folosi și helperele: $block->getViewFileUrl('images/logo.png') pentru fișiere din temă.