Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reddit_pulls_the_wrong_thumbnail [2015/05/15 14:49] (current)
Joel Dare created
Line 1: Line 1:
 +===== Reddit Pulls the Wrong Thumbnail =====
  
 +I spent a bit of time today trying to figure out why Reddit was pulling the wrong thumbnail for a page of mine. Here are some things you should know about how Reddit pulls the thumbnail image.
 +
 +First, reddit will use the facebook graph meta tags if they exist on the page. Those tags look like this.
 +
 +  <meta property="​og:​image"​ content="​http://​www.example.com/​image.png"/>​
 +
 +If you don't have that meta tag on your page then it seems that Reddit finds the first image that would make a good thumbnail. It currently seems to prefer square or portrait images for this. All my images were square, except for the logo image at the top of the page, and reddit correctly picked that after I removed another hidden image that was getting in the way.
 +
 +Reddit caches the page the first time it requests it. As a result, my first submission was wrong, so it continued to be wrong each time I submitted it. My changes to the page were having no effect. To solve the problem I added a ?reddit= parameter to the end. So, the URL became:
 +    http://​www.joeldare.com/​wiki/​maker:​making_a_folded_coin_ring_from_a_quarter?​reddit=0001
 +
 +The parameter itself isn't really important. Reddit just sees this as a different page so it doesn'​t use it's cached copy. The parameter is ignored by the website so it makes no difference to the page.
 

comments powered by Disqus
reddit_pulls_the_wrong_thumbnail.txt ยท Last modified: 2015/05/15 14:49 by Joel Dare