Invalid URL when trying to validate a product in shopify store


#1

Hi following these instructions we are trying to get cards setup with our shopify store.

http://blog.viralica.com/2013/09/twitter-product-cards-on-shopify/

Every tag passes except Image except for image and does not validate or return, come back with invalid URL for the image. Any ideas?

Sample code below. Thanks!


#2

It looks like it might be the “relative protocol” in the twitter:image tag. Put “http:” before the “//” and it should work more predictably I think.


#3

Hi taylor,
Thanks for chiming in…

That seems to be pulling from the img source in the article.content below. Do you have any suggestions to change on that line?


{% 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:' %} {% if src %}{% endif %} {% endif %} {% else %} {% if settings.logo_image == 'logo.png' %} {% endif %} {% endif %}