Get url from media Magento 2
// Template <?php echo $this->getUrl('pub/media/[path_dir]')?>
// cms {{media url="wysiwyg/demo.jpg"}}