sharing articles problem - Forum | JoomShaper
Solved General

sharing articles problem

Asked by apostolos 5 years ago Last activity 5 years ago

When trying to debug a page where OpenGraph image tag is set, i get the following error in the facebook debugger:

Provided og:image URL, "mysite" could not be processed as an image because it has an invalid content type.

because of this problem the preview of the photo does not appear when I post an article on facebook and twitter

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff

BTW

If you have hotlink protection enabled, that is likely the issue. Check cPanel setting and disable hotlink protection and see if that fixes the issue.

6 more replies

Ariba Staff

OpenGraph images should use og:image:url instead of og:image

$this->document->addCustomTag('<meta property="og:image" content="'.JURI::root().$og_image.'" />');

Change to:

$this->document->addCustomTag('<meta property="og:image:url" content="'.JURI::root().$og_image.'" />');

Can you kindly check if the solution works?

apostolos Asked this

in which file should I make the change?

Ariba Staff

This is the file location:
/components/com_sppagebuilder/views/page/view.html.php

apostolos Asked this

unfortunately the problem remains

Paul Frankowski Senior Staff

Maybe try different image type, use jpg , not jpeg or other type.


Facebook offcial requirements

  1. The minimum allowed image dimension is 200 x 200 pixels.
  2. The size of the image file must not exceed 8 MB.
  3. Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.

If you have any problems with images not being displayed correctly for a URL, try plugging in the image URL in the Sharing Debugger for any errors >> https://developers.facebook.com/tools/debug

apostolos Asked this

Thank you all for your advice. The problem is solved. I turned it off hotlink protection and that fixes the issue.

Paul ,
once again your knowledge proved to be excellent

Log in to reply.