2
<img alt="" src="{{media url="wysiwyg/my_image_large.png"}}" height="100" width="300" />

The previous code is included in products description. In frontend the result looks like this:

<img alt="" src="{WWWWW{WWWWWmedia url=" wysiwyg="" my_image_large.png"wwwww}wwwww}"="" height="100" width="300">

Does anybody know what could cause something like that?


-----------UPDATE-------------

I found that all variables work this way. They all give the same code:

{{config path="web/secure/base_url"}}

gives

{WWWWW{WWWWWconfig path="web/secure/base_url"WWWWW}WWWWW}


-----------UPDATE 2-------------

I found that this solution works, when displaying product description:

$_description = $this->getProduct()->getDescription();
$_myHelper = Mage::helper('cms');
$_processor = $_myHelper->getBlockTemplateProcessor();
echo $_processor->filter($_description);

It doesn't make sense and it's a temporary solution. But it might give you a clue of what's causing the issue here.

1
  • Are you getting anything in Magento's log files? Commented Mar 8, 2019 at 10:45

3 Answers 3

0

You escape the media url function by using double quotes withing the brackets. try:

src="{{media url=wysiwyg/my_image_large.png}}"
3
  • I tried that but I'm getting the same result
    – zekia
    Commented Mar 8, 2019 at 13:00
  • You tried without the double quotes in the double brackets? If that doesn't work, maybe use single quotes withing the brackets?
    – Stijn DR
    Commented Mar 8, 2019 at 13:28
  • please read my question update. Problem seems to be in {{ and not in brackets
    – zekia
    Commented Mar 8, 2019 at 13:32
0

try this

replace media url="wysiwyg/my_image_large.png" with media url='wysiwyg/my_image_large.png' or media url="wysiwyg/my_image_large.png" with media url=wysiwyg/my_image_large.png inside img tag

1
  • I tried that but I'm getting the same result
    – zekia
    Commented Mar 8, 2019 at 13:00
0

You could try this, use it like this: <img src="{{media url=&quot;wysiwyg/my_image_large.png&quot;}}" alt="" style="height="100" width="300"" />

1
  • I tried that but I'm getting the same result
    – zekia
    Commented Mar 8, 2019 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.