Question

I am getting category description on 2columns-left.phtml by following code:

display category description

Text are showing but media wysiwyg images not showing on frontend.

I am getting images in WYSIWYG Editor like:

<img alt="" src="{{media url="wysiwyg/category_quality_image/em1.jpg"}}" / loading="lazy" fetchpriority="high">

How to display images on frontend of category description?

Was it helpful?

Solution

replace your code with

<?php 
$_description = Mage::getModel('catalog/layer')->getCurrentCategory()->getDescription();
echo $this->helper('catalog/output')->categoryAttribute($_category, $_description, 'description');
?>

OTHER TIPS

Try this code:-

$_cmsHelper = Mage::helper('cms');
$_process = $_cmsHelper->getBlockTemplateProcessor();
echo $_process->filter($category_description);

you can try this:

<?php echo '<img alt="" src="{{media url="wysiwyg/category_quality_image/em1.jpg"}}" />' ?>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top