I'm using wysiwyg editor to insert image but it return full URL path inserted of media URL in content area.

WYSIWYG is returning path like

<img alt="" src="mydomain.com/media/wysiwyg/the-picture.jpg">

but iI want a URL like

<img src="{{media url=wysiwyg/the-picture.jpg"}}" alt="" />

any help would be appreciate.

2 Answers 2


ohh i got answer Myself Login to Admin.

Go to System > Configuration > Content Management (Under General) > WYSIWYG Options

Use Static URLs for Media Content in WYSIWYG for Catalog’ – Select “No”


the error is due to Mage::getBaseUrl('media') does not pass the store parameter !

To solve this bug, change in :


Find function : getImageHtmlDeclaration

and change :

$mediaPath = str_replace(Mage::getBaseUrl('media'), '', $fileurl);


$mediaPath = str_replace(mage::app()->getStore($this->_storeId)->getBaseUrl('media'), '', $fileurl);

Your Answer

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

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