DanWebb
10/2/2014 - 9:00 AM

Find an image within a content block

Find an image within a content block

{% assign src = item.content | split: 'src="' %}
{% assign src = src[1] | split: '"' | first | replace: '//cdn', 'http://cdn'; | replace: 'http:http://';, 'http://'; | remove: 'https:' %}
<img src="{{src}}">