Change {{media url="wysiwyg/image.jpg"}} in frontend in custom module
You can filter its using filter() function,
$content = 'This is test demo imgage, {{media url="wysiwyg/some_image.jpg"}}';
$om = \Magento\Framework\App\ObjectManager::getInstance();
$filterManager = $om->get('Magento\Cms\Model\Template\FilterProvider')->getPageFilter()->filter($content);
echo $filterManager;
You need declare this Class in constructor of Block:
Magento\Cms\Model\Template\FilterProvider $filterProvider
$content = '{{media url="wysiwyg/some_image.jpg"}}';
$contentGenerating = $this->_filterProvider->getPageFilter()->filter($content);
echo $contentGenerating; //Generate HTML <img src="http://baseUrl/pub/media/wysiwyg/some_image.jpg"/>
I hope it help you.