ImagePro element and dimensions

6 months 16 hours ago #1333
Topic Author
Charalampos Kontopanagos's Avatar
Posts: 3
ImagePro element and dimensions

Hi there,
I bought the OpenGraph for Zoo.
There are some minor issues. It seems that FB needs dimensions for instant scrap or else (sometimes) gives a blank image and after scrapping again it gives the images.

I use ImagePro from Zoolanders.
Can you point the line of code to put my custom image element (ImagePro element) and the image dimensions (or even hardcoded because almost all images are the same size) ?

Thanks in advance

6 months 15 hours ago #1334
Eugene's Avatar
Posts: 475
ImagePro element and dimensions

Hi Charalampos,
Let me explain how it works.
Open Graph is a protocol that processes information from your site and generates special HTML tags to be used by social networks (FB, Twitter). Our plugin helps to automatize the process and takes an image from standard ZOO element. We have had a similar discussion some months ago, I replied in details in this post .

1.Image size. Our plugin does not resize images, it should be under user's control. Facebook recommends 1200 x 630 pixels for the og:image dimensions, which is an approximate aspect ratio of 1.91:1. See details .
If images used in GalleryPro does not meet FB requirements for optimal image size, then you need to prepare new images with correct dimensions and add them manually to the item (article) via our OpenGraph element.

2. ImagePro is a commercial element from 3rd party developer and we do not have an ability to see the source code. If you need us to make such kind of fix, then I'd ask you to prepare a dev site and provide us credentials to examine the code and make experiments.

3. Facebook caching. Facebook and LinkedIn and maybe other social networks do have problems reading open graph information when the page is rendered with help of GZIP Compression. Then they are not able to display correct open graph information. Perhaps can help to solve this problem.


Like our extensions and support?
Add your voice to the JED listing with a 5-star review: bit.ly/2ciJBqC
Thanks!
Last Edit: 6 months 15 hours ago by Eugene.

5 months 4 weeks ago #1339
Topic Author
Charalampos Kontopanagos's Avatar
Posts: 3
ImagePro element and dimensions

Hi, maybe my english is not very good and was misunderstood in a way.

1. I don't want to resize nothing. Just to declare a size. (og:width og:height) - even despite of the actual size. In your code I don't see og:widgh/height lines. Just that.

2. I know and I don't ask you do to anything about ImagePro (actually Zoolanders could respond the same way you did because their element is an element and parsing from another element it's not their job but anyways) .
What I say is that the original image element (in Blog app) is cdce6654-4e01-4a7f-9ed6-0407709d904c and mine is f1ed25bc-aa4d-48c9-af0b-fd3ae24af1b6 . What I'm asking you is to point the code that is responsible for getting the cdce6654-4e01-4a7f-9ed6-0407709d904c and nothing more. And that's because I don't want to manually put the image.

3. I'll try this tip again even in the past didn't actually see any different behavior

Last Edit: 5 months 4 weeks ago by Charalampos Kontopanagos.

5 months 3 weeks ago #1345
Eugene's Avatar
Posts: 475
ImagePro element and dimensions

Hello Charalampos,

1. Open Graph Width/Height params. If the image has a bigger size, it will be reduced in FB feed automatically, from the other hand setting up a lesser size makes images looks not nice. Actually, I cannot imagine the situation when these params might be required to use despite the fact they are included in the protocol. That's why there are no such params in settings.
Anyway, you can modify the plugin and add required tags manually.

Open /plugins/system/zooopengraph/zooopengraph.php

Find lines 114-115, 231-232 and 392-393:

				// Image
				!empty($opImage) ? $script[] =  '<meta property="og:image" content="' . JURI::root() . $opImage . '"/>' : false;

You can add required tags there according to The Open Graph protocol like this example:
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />

2. You need to open zooopengraph.php file again and find line 77:
			$opImage = $this->params->get('image', 0);
Find lines 114-115, 231-232 and 392-393:
							// Image
				!empty($opImage) ? $script[] =  '<meta property="og:image" content="' . JURI::root() . $opImage . '"/>' : false;

These lines are responsible for generating og:image tag.


Like our extensions and support?
Add your voice to the JED listing with a 5-star review: bit.ly/2ciJBqC
Thanks!
Last Edit: 5 months 3 weeks ago by Eugene.

5 months 3 weeks ago #1348
Topic Author
Charalampos Kontopanagos's Avatar
Posts: 3
ImagePro element and dimensions

Thanks!

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Product Latest Update