7

I Have a magento2 EE with a headless implementation. Hence I am using the rest/V1/cmsBlock/<id> to fetch the content which is added by admin (WYSIWYG).

Problem:

I see the output like :

<response>
    <id>2</id>
    <identifier>pirates</identifier>
    <title>Pirates are Back!</title>
    <content>
        <h2><img src="{{media url="wysiwyg/the-Pirates-of-the-Caribbean--172-Jack-Sparrow.jpg"}}" alt="Pirates are Back" width="387" height="259" /></h2>
    </content>
    <creation_time>2017-01-09 16:03:20</creation_time>
    <update_time>2017-01-09 16:07:12</update_time>
    <active>true</active>
</response>

Now my front-end does not really understand

{{media url="wysiwyg/the-Pirates-of-the-Caribbean-Pop-172-Jack-Sparrow.jpg"}}

So now, how do I get the actual URL of the image instead of the variable. As a part of the XML response itself without overriding the API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.