How to know if the link you’re sharing on Twitter will produce an in-tweet image preview

tl;dr – check if the link you’re sharing can produce an inline image preview by running it though Twitter’s Card Validator. If it doesn’t you can cheat by manually uploading or pasting in an image.

The order and type of links in your tweet can affect things: pasting in a link to a tweet always displays that tweet regardless of other links involved or their order but for any two (or more) non-tweet links included in your tweet the last one is displayed. You can prevent a link from displaying an image by converting it to an is.gd shortened link (not bitly though), or override by adding an image to the tweet.

Instagram is a law unto itself and linking your Twitter & Instagram won’t display your Insta posts, you need a third party app for that.

In my previous post, How the order of links in tweets determines which one gets its accompanying image displayed, I played around with the order (in a tweet) of links that either do or don’t produce an inline image preview.

This is what an inline image looks like.

Screenshot 2019-02-17 08.59.42

The picture below the text appears automatically after I shared a link (the link itself becomes hidden and is replaced with the image) to a post on this blog about Instagram images. Instagram doesn’t support Twitter cards so letting Instagram autopost your Insta posts to Twitter doesn’t work in terms of displaying an image, you need a third party app to do that – details in that post I’ve just linked to.

  1. For an inline image to appear the site being linked to must have Twitter cards set up correctly [technical info for web developers].
  2. You can check if any given link will work by plugging it into Twitter’s Card Validator (note that the S in HTTPSĀ may be important so try that first if you’ve copied over an HTTP address).
  3. If (2) doesn’t work and you aren’t able to set up (1) you can always cheat by just uploading an image or pasting in a screenshot of the image you’d like to appear. The link you share won’t disappear (it’ll show up as a clickable link) but hardly anyone will notice this workaround šŸ™‚

If you include links to two or more posts that have Twitter cards working then the last one mentioned in your tweet will have its image preview shown. If you include a Twitter-card link alongside a non-card link then the card link will always show its image and the order of the links doesn’t matter. For an enjoyably pedantic (YMMV) examination of the effect of the order of links have a look at my earlier post: How the order of links in tweets determines which one gets its accompanying image displayed.

Note that if you include in your tweet a link to another tweet (even if included with a link that would normally produce an inline image) it seems that the link to the tweet will always take precedence and show up, regardless of the order you write them in your tweet. In the example below (using my testing account) I’ve reversed the order of two links, one to a post on this blog about getting rid of ‘your friend liked this tweet‘ notifications, the other to a tweet of mine about a Wikipedia page I created.

Screenshot 2019-02-15 23.25.19

Advertisements

How the order of links in tweets determines which one gets its accompanying image displayed

tl;dr – the last link in a tweet is the one that will show up with a media preview if that link has Twitter cards associated with it (eg almost all news sites).

If two links are tweeted but one has cards and the other doesn’t then the order doesn’t matter, the cards link always shows up.

If a tweet includes the link to another tweet then the tweet will always appear (it will look the same as how a quote RT looks) because a linked tweet will override any other link that has media preview capability / Twitter cards. (If two tweet links are shared then the last one shows up)

If you want to override any of this and control what appears in the media preview you can just upload or paste in an image.


Some tweets that have a link included will display the text of the tweet and the text of the link – the whole tweet is just text, with the link in a different colour (often blue, but different profile colours chosen can mean they’ll show in a different colour if you’re on their profile).

This is my test account ‘FriendlyBlocker‘ (set up to test Twitter’s block functions) publishing a tweet which contains only a link to a Wikipedia article I wrote on the nonsense that is CEASE therapy – the link shows up as a link.

Screenshot 2019-02-15 23.03.15
Tweet with a Wikipedia link in it

In a different tweet below I’ve shared a link to a BBC article, and nothing else. The link is nowhere to be seen in the ‘bit where the text would go’. Instead there’s just a clickable picture that takes you to the article. This is because the BBC site has set up Twitter cards so that the shared link automatically pulls the image from the BBC’s website and displays it as a media preview. The link shows up as a picture.

Screenshot 2019-02-15 23.05.25
Tweet with a BBC link in it

 

I’ve occasionally shared more than one link in a tweet and expected one of them to show up as a picture and been a bit surprised when the other one has. I thought I’d investigate what role the order of the links might play, and different types of links. Here are the results of my study into this phenomenon šŸ˜‰

  1. If one of the links is associated with Twitter Cards and the other one isn’t then the order dosn’t matter at all, the cards one will always be displayed as the image. You can always override this by uploading an image to your tweet, then both links will show as links. (You can upload an image or just Ctrl+V to paste one in).

    Screenshot 2019-02-15 23.13.43
    Two tweets both containing the same two links to Wikipedia article and to this blog. As WordPress blogs have Twitter cards and Wikipedia seems not to, the WP blog post is always displayed as an image and not just as a link.
  2. Where two or more links each having Twitter cards associated with them then the order does matter. From my mildly extensive testing it seems that LAST is where to put the one you want to appear as the image.

    Screenshot 2019-02-15 23.16.52
    Two tweets with two links, with the order of the links reversed. Both links have Twitter cards associated with them and in both cases the second link posted is the one that shows up as an image.
  3. It looks like the link of another tweet included in a tweet (as opposed to retweeting) will override any other link that has a Twitter card.
    Screenshot 2019-02-15 23.25.19
    Two tweets, two links (one of them to another tweet) showing that the order makes no difference and the Twitter card for the tweet is always diplayed.

    Again this could be overridden by including a separate image if you don’t want the text of the tweet to show up and do want the image to show up of the link.

    Screenshot 2019-02-15 23.30.52
    Adding an image overrides the Twitter cards and makes the order of the links irrelevant.

    Note that quote tweeting the tweet and adding a link also doesn’t work, the tweet will override whatever link is added in the quote part.

    Screenshot 2019-02-15 23.33.26
    A quote RT of a tweet, with a link to this blog (which has Twitter cards associated with it) added. The tweet overrides and shows up in the media area.
  4. Just to demonstrate that it’s the LAST position for the link to show up as the image in the media area (where all links have cards associated with them, and none of them is a tweet URL…) here are three links with the order varied, in all cases the link placed last is the one that shows up as the picture.If one of the links is a tweet that’ll override everything else and always show up, regardless of the order.

    This is what I wrote for the three tweets, from top to bottom.

    Link B (BBC) https://www.bbc.co.uk/news/science-environment-47242477
    Link C (Buzzfeed) https://www.buzzfeed.com/farrahpenn/cleaning-hacks-that-are-borderline-genius
    Link A (blog) https://howtodotechystuff.wordpress.com/2017/07/27/hate-seeing-other-peoples-likes-on-twitter-some-options-to-try/

    Link A (blog) https://howtodotechystuff.wordpress.com/2017/07/27/hate-seeing-other-peoples-likes-on-twitter-some-options-to-try/
    Link C (Buzzfeed) https://www.buzzfeed.com/farrahpenn/cleaning-hacks-that-are-borderline-genius
    Link B (BBC) https://www.bbc.co.uk/news/science-environment-47242477

    Link A (blog) https://howtodotechystuff.wordpress.com/2017/07/27/hate-seeing-other-peoples-likes-on-twitter-some-options-to-try/
    Link B (BBC) https://www.bbc.co.uk/news/science-environment-47242477
    Link C (Buzzfeed) https://www.buzzfeed.com/farrahpenn/cleaning-hacks-that-are-borderline-genius

    Screenshot 2019-02-15 23.54.37

  5. And for completists here are tweets containing two links to two other tweets, re-ordered. In both cases the last link is the one that shows up.

    Screenshot 2019-02-16 14.00.40
    https://twitter.com/JoBrodie/status/1077394079955193856
    https://twitter.com/JoBrodie/status/1077393442769174528

    The text of the URL for the tweets is shown above (made as non-clicky links to show the actual link, WordPress automatically converts tweet URLs to an embedded tweet)