2

In the Facebook debugger, scraping the URL "https://www.givingway.com/organization/the-light-and-leadership-initiative" yields the error:

Corrupted Image

Provided og:image URL, https://d141thk7ygtt3c.cloudfront.net/043a7261-eb4f-48ce-9db6-8cbeefcf86df.jpg could not be processed as an image. It may be corrupted or may have an invalid format.

At the same time scraping the URL "https://www.givingway.com/organization/youth-in-action-against-poverty-and-hivaids-yaapha" works fine.

I can't figure out what causes this issue, as both pages:

  • are both produced from the same template, and share the same HTML structure.
  • have an og:image with the same structure.

<meta property="og:image" content="https://d141thk7ygtt3c.cloudfront.net/043a7261-eb4f-48ce-9db6-8cbeefcf86df.jpg" />

<meta property="og:image" content="https://d141thk7ygtt3c.cloudfront.net/b954d1df-57e6-4beb-acae-2916997a8e4e.jpg" />

  • Both images are JPEG.
  • Opening the image URL in a separate tab displays an image - which isn't the behavior I'd expect from a corrupted page.

This inconsistency occurs on various pages - certain pages are scraped successfully, while others aren't.

Ben Carp
  • 24,214
  • 9
  • 60
  • 72
  • Back in 2012 there was an issue processing images with the og:image tag, when the URL was using https (https://stackoverflow.com/a/8910877/7224430). This isn't the case here since facebook succesfully scrapes other https imag URLs. – Ben Carp Feb 17 '19 at 16:46

2 Answers2

1

There is an open bug on Facebook (Opened Feb 8). When the og:image tag points to an image that is hosted on CloudFront the Facebook debugger behaves inconsistently - can process some and can't process others. Hopefully Facebook and CloudFront can solve this issue in the near future.

Ben Carp
  • 24,214
  • 9
  • 60
  • 72
0

If you upload a image file to s3 by library(ex. python boto3), please check ContentType arguments.

I uploaded a image file with boto3 without ContentType arguments, the content-type of file in metadata set default value "binary/octet-stream".

After i passed ContentType="image/png" argument, metadata set well and facebook og tag looks good. (description below image, not aside)