Sharing Articles Problem - Question | JoomShaper
SP Page Builder 6 is Here! Learn More →

Sharing Articles Problem

apostolos

apostolos

General 4 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

1
7 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 4 years ago #19810

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.

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19322

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?

0
apostolos
apostolos
Accepted Answer
4 years ago #19324

in which file should I make the change?

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19333

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

0
apostolos
apostolos
Accepted Answer
4 years ago #19342

unfortunately the problem remains

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 4 years ago #19809

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

0
apostolos
apostolos
Accepted Answer
4 years ago #19943

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

0