Skip to content

Instantly share code, notes, and snippets.

@darrensq
Forked from freakdesign/extract-image-liquid
Last active August 29, 2015 14:15
Show Gist options
  • Save darrensq/ceaecdc4589a716124b6 to your computer and use it in GitHub Desktop.
Save darrensq/ceaecdc4589a716124b6 to your computer and use it in GitHub Desktop.
{% if article.content contains "<img" %}
{% assign src = article.content | split: 'src="' %}
{% assign src = src[1] | split: '"' | first | replace: '//cdn', 'http://cdn' | replace: 'http:http://', 'http://' | remove: 'https:' %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment