Twitter image access problem

Hello all,

I have a problem with my twitter image metadata that happens often to me with grav.
I have defined my metadata like this:
<meta name="twitter:image" property="twitter:image" content="http://radioglaces.net/user/themes/radioglaces/images/radioglaces_twitter.png" />

But Twitter doesn’t manage to access it when i test it in the card validator , it outputs this log:

INFO:  Page fetched successfully
INFO:  18 metatags were found
INFO:  twitter:card = summary_large_image tag found
INFO:  Card loaded successfully
WARN:  The image URL http://radioglaces.net/user/themes/radioglaces/images/radioglaces_twitter.png specified by the 'twitter:image' metatag may be restricted by the site's robots.txt file, which will prevent Twitter from fetching it.

So it doesn’t display the image. My robots.txt file is defined like this:

User-agent: *
Disallow: /backup/
Disallow: /bin/
Disallow: /cache/
Disallow: /grav/
Disallow: /logs/
Disallow: /system/
Disallow: /vendor/
Disallow: /user/
Allow: /user/pages/
Allow: /user/themes/
Allow: /user/images/
ALlow: /user/themes/radioglaces/images/

User-agent: Twitterbot
Allow: /user/themes/radioglaces/images/radioglaces_twitter.png

Do you know what I am doing wrong?
Webpage in development is here
Thanks in advance.

Hi @nix, my technical knowledge is limited on this subject, but I’ve had success using Grav frontmatter for my Twiter cards. Here is an example:
https://gitea.hibbitts.openetc.ca/SFU/sfu-cmpt-363/raw/branch/master/pages/04.203/01.home/blog.md

And here is some related docs:

Hope the above helps!
Paul

I am also having this exact problem. And the robots.txt seems to be Ok, as the path for the image is allowed. Google robots.txt test tool will also confirm that this is correct, so I believe that this is a problem with Twitter robots rules detection…

Adding these lines in the end of the robots.txt file seems to work:

User-agent: Twitterbot
Allow: /user/themes/radioglaces/images/radioglaces_twitter.png
Allow: /user/pages/
Allow: /user/themes/
Allow: /user/images/
ALlow: /user/themes/radioglaces/images/
2 Likes