Add this code WYSIWYG Editor
<p><img src="{{media url="wysiwyg/menu/test.jpg"}}" alt=""></p>
but it's not working in magento 2.4.0
Please try the below code.
/**
* @var \Magento\Cms\Model\Template\FilterProvider
*/
protected $filterContent;
/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Cms\Model\Template\FilterProvider $filterContent
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Cms\Model\Template\FilterProvider $filterContent
) {
parent::__construct($context);
$this->filterContent = $filterContent;
}
/**
* Get filter content
* @param string $content
* @return string
*/
public function getFilterContent($content)
{
return $this->filterContent->getPageFilter()->filter($content);
}
Let me know if you still face any issues.