This doesn’t work, the myIcon_url variable corresponds to a placeholder ‘no-image’ url:
{% assign myIcon_url = 'myIcon.svg' | file_img_url %}
{% assign myIcon_tag = '<img src="' | append: myIcon_url | append: '">' %}
{{ product.description | replace: '<!-- myIcon here-->', myIcon_tag }}
But this does work:
{% assign myIcon_url = 'myIcon.svg' | file_url %}
{% assign myIcon_tag = '<img src="' | append: myIcon_url | append: '">' %}
{{ product.description | replace: '<!-- myIcon here-->', myIcon_tag }}
Reading the documentation, I don’t see what might be the cause of this discrepency. Is it a bug, or am I missing something?