og:image could not be downloaded because it exceeded the maximum allowed sized of 8Mb

后端 未结 4 487
醉话见心
醉话见心 2021-02-01 13:02

Building a website that requires sharing links with an image. Done this I don\'t know how often...but this time the Facebook Open Graph Debugger says:

og:image {image ur

4条回答
  •  独厮守ぢ
    2021-02-01 13:19

    I realize this is an old question and has an accepted answer, but as of now, 2018, none of the solutions above worked for me by themselves. What finally worked is a combination of workarounds:

    • add a HTTP version in the og:image tag and add a og:image:secure_url tag that points to a HTTPS version. In the debugger tool, you should now be getting a message that fetching the image is an asynchronous process and thus won't be available for first request
    • add og:image:height, og:image:width and og:image:type meta tags with appropriate contents. The asynchronous message in the debugger should now disappear and you should be able to see the image on first fetch as well

    My website is a HTTPS only (HTTP requests are redirected to HTTPS version), images are hosted on Amazon S3. I am using a Cloudfront CDN, but I had to serve the og:image directly from S3. Trying to serve it from the CDN seems to work fine as long as the image is already cached in the CDN. If the image is not cached in CDN and Cloudfront forwards the request to S3, FB debugger reports an error.

    It seems like FB doesn't play well with redirects and HTTPS versions noted in the og:image meta.

提交回复
热议问题