On link posts, the reddit scraper is not scraping an image from my site for a thumbnail and I cannot see why. I have followed any small snippet I could find about it which basically said.
- Use a squareish image, less than 1.5:1 ration on the sides.
- make the size as small as possible.
- link it with the open graph protocol http://ogp.me/
I have done all of these and added this in the html with no luck, and nowhere else to turn to.
<meta property="og:image:secure_url" content="static/screenshot.png" />
If the scraping code finds an
og:image
, it will return the url unmodified. This url is then passed directly to_fetch_url()
, which calls_initialize_request()
, which ignores non-absolute urls. So, try specifying an absolute url for your image and it should work.From a brief look at the Open Graph spec, I don't see anything about requiring absolute urls, so this might be considered a bug in reddit. It would be fairly easy to solve, since the relevant code already has access to the requested page for the purposes of setting the referrer, so you may wish to post about it on r/bugs.