FROM CACHE - en_header

No image for Twitter card on a shopify home page

Shopify Partner
17 0 3

I tried different code methods but no matter what I can't seem to get twitter to show any of my images or even my store logo img when people link to my home page on twitter. Has anyone solved this problem? The other pages seem to be fine but the home/index no bueno.

Examples here 

Replies 3 (3)
Shopify Staff (Retired)
Shopify Staff (Retired)
205 1 69

Hey, Christopher. 

Leon here from Shopify Support. 

Is this the image picked when you share a link in a tweet? If so, Twitter has put together a troubleshooting guide for any issues with Twitter cards here

It looks like the answer to the specific problem with images not appearing in cards has been answered in this thread.

I hope this helps. 



Leon | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Shopify Partner
17 0 3



Thanks for the reply. I'm searching that thread and it's still not too clear but it's a big thread. What I'm trying to do is make sure that when say any random user tweets about the home page that it will show some sort of image next to the description and headline which do pickup just fine.

I might just be using old code too since there are multimple posts on getting cards to work. I show as whitelisted but still no image comes up for the index links 😞

Shopify Partner
17 0 3

It's very odd, I tested other pages and they all get images with no issue. I see that when I check with the Twitter validator it tells me that it's whitelsited and it shows the process...


"INFO:  Page fetched successfully

INFO:  21 metatags were found

INFO:  twitter:card = summary_large_image tag found

INFO:  Card loaded successfully"


and maybe my index doesn't have a "summary_large_image" ? Here's my full twitter liquid card code below.



{% assign template_base = template | split: '.' | first %}
{% assign og_title = page_title  %}
{% assign og_description = page_description | default: shop.description | default: %}

{% if settings.logo_use_image %}
  {% capture twitter_image_tag %}<meta name="twitter:image" content="http:{{ 'logo.png' | asset_img_url: 'grande' }}">{% endcapture %}
{% endif %}

{% comment %}
  Template specific overides
{% endcomment %}
{% if template_base == 'product' %}
  {% assign og_title = product.title | strip_html %}
  {% capture twitter_image_tag %}<meta name="twitter:image" content="http:{{ product | img_url: '1024x1024' }}">{% endcapture %}

{% elsif template_base == 'article' %}
  {% assign og_title = article.title | strip_html %}
  {% assign og_description = article.excerpt_or_content | strip_html %}
  {% if article.image %}
    {% capture twitter_image_tag %}<meta name="twitter:image" content="http:{{ article | img_url: '1024x1024' }}">{% endcapture %}
  {% endif %}

{% elsif template_base == 'password' %}
  {% assign og_title = %}
  {% assign og_description = shop.description | default: %}
{% endif %}

<meta name="twitter:site" content="{{ settings.social_twitter_link | split: '' | last | prepend: '@' }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ og_title }}">
<meta name="twitter:description" content="{{ og_description }}">
<meta name="twitter:image:alt" content="{{ og_title }}">
{{ twitter_image_tag }}