Topic-icon Duplicate og:image Tag in Pages

Active Subscriptions:

None
10 years 8 months ago - 10 years 8 months ago #54840 by altitudes
Hello

In some pages, I have 2 og:image tags, e.g. in page www.salondesgrands.com/actualite/17-une-...r-prolonger-le-salon :
<meta property="og:image" content="http://www.salondesgrands.com/images/articles/actualite/LogoNuitDesGrands2015.jpg"/>
<meta property="og:image" content="http://www.salondesgrands.com/images/templates/logoOG.png"/
This because:
- in Open Graph > Configuration section, I have set image=http://www.salondesgrands.com/images/templates/logoOG.png in Defaults
- in Open Graph > Objects, I have defined that my article image should be used

In Open Graph > Configuration, Defaults option description is:
Default tags to be used on page *if* more specific tags are not created by Open Graph plugins or {SCOpenGraph ..} tags.

Obviously, its not the case... Did I miss something?
Last edit: 10 years 8 months ago by altitudes.
The topic has been locked.
Support Specialist
10 years 8 months ago #54846 by mel
Replied by mel on topic Duplicate og:image Tag in Pages
The og:image tag is an exception to that description, since Facebook allows for multiple image tags on the page. When only one tag is allowed to be declared, JFBConnect does give the default setting the lower priority. I do agree that our description is a little confusing.

-Melissa
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago - 10 years 8 months ago #54851 by altitudes
OK, it makes sense, but then in HTML code default og:image should be put before the og:image set for the article. Because Facebook takes the latest image first... and you probably want that the image you've set for the article is used rather than de default one.

Most of people sharing the page won't take the time to choose the image used, so it is important that you control what is the image that is proposed first.
Last edit: 10 years 8 months ago by altitudes.
The topic has been locked.
Support Specialist
10 years 8 months ago #54857 by alzander
JFBConnect follows the Open Graph specification. Specifically:

If a tag can have multiple values, just put multiple versions of the same <meta> tag on your page. The first tag (from top to bottom) is given preference during conflicts.

ogp.me/#array

If you are seeing different behavior, it likely means that Facebook doesn't like the first image that is set due to it's size or something else. Please run your page through the Facebook Debugger , it will show the images in the proper order and/or may give you more information on why the image isn't correct.

I hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago - 10 years 8 months ago #54864 by altitudes
Hello

Indeed, Open Graph specification is clear. And the reason why Facebook uses the second image in my case seems to be that it has a higher resolution (see developers.facebook.com/docs/sharing/best-practices#images for Facebook recommendations for images).

I know what I have to do now: lower my default image resolution, because for sure I won't use a high resolution for all my article images just to please Facebook! ;)

Thank you
Last edit: 10 years 8 months ago by altitudes.
The topic has been locked.
Support Specialist
10 years 8 months ago #54868 by alzander
I'm glad we could help explain. The solution of lowering your default image isn't really a good one. I think Facebook only wants a minimum 200x200 image, though much higher is preferred. If you are going to make your default small, then you're basically leaving it to Facebook to guess which one to use. While the OG spec may state the normal priority, Facebook uses algorithms for everything, which means they don't always follow spec.

The best option is to try to use higher (though it doesn't have to be crazy high) resolution images where possible. That's good for tablets, retina display macs and various other viewing habits as well.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago - 10 years 8 months ago #54871 by altitudes
On this page for example, article image is 720x421 whereas default (site) image is 1500x1500. My article image resolution is not so bad, but not good enough for Facebook ;)

I think I will have to do some tests to choose my default image resolution, so that it is good enough to have a good rendering when it is used, and bad enough so that Facebook rather chooses the article image whenever one is available!
Last edit: 10 years 8 months ago by altitudes.
The topic has been locked.
Active Subscriptions:

None
10 years 8 months ago #54875 by altitudes
For your information I had to downsize my default image to 550x550 so that my article 720x421 image takes precedence.

720x421 = 303 Kpixels
550x550 = 302 Kpixels

maybe that's why... 555x555 = 308 Kpixels was not small enough. But not sure Facebook algorithm is that simple ;)
The topic has been locked.
Support Specialist
10 years 8 months ago #54878 by alzander

But not sure Facebook algorithm is that simple

I wouldn't be surprised if it is that simple. They just want the best picture. Since they can't see what the picture is or relate it to the actual content of the page, the resolution is the best thing they can quickly get. It would be a bit annoying if 2 very high resolution pictures were added, but Facebook still didn't respect the order and just took the largest, but when you get to lower (less then 800x600, lets say), I can see that resolution is all that matters.

Anyways, I'm glad to hear we could help explain things and that you got everything going. Should you need anything else, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect, or our support, on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/extensi...l-display/jfbconnect

Thanks,
Alex
The topic has been locked.