Search code examples
phphtmlfacebookmeta-tags

How to fix the OG:image issue with encoding?


This is my url: https://www.josvanderlubbe.nl/nieuws/certificering

When I crawl my URL with the facebook debug tool I get the following message:

Provided og:image, https://www.josvanderlubbe.nl/images/nieuws/jos-vander-lubbe-certificaat.jpg could not be downloaded. This can happen due to several different reasons such as your server using unsupported content-encoding. The crawler accepts deflate and gzip content encodings.

I checked the server logs:

31.13.127.6 - - [01/Nov/2019:14:39:10 +0100] "GET /nieuws/certificering HTTP/1.1" 206 8664 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"
31.13.127.22 - - [01/Nov/2019:14:39:12 +0100] "GET /images/nieuws/jos-vander-lubbe-certificaat.jpg HTTP/1.1" 200 503100 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

This is driving me crazy, does anyone know how to fix this issue. I tried adding the following things to .htaccess:

AddDefaultCharset UTF-8
AddCharset UTF-8 .htm .html .css .js .php

I don't get it. Other websites on my server are working normally. I don't see why this would happen like this. Facebook is such a pain in the ass to work with.


Solution

  • Did you try decreasing the image size? It worked in my case when I too had faced a similar issue. You may refer the link