Thread Locked This thread is locked - replies are not allowed.



Permlink Replies: 7 - Pages: 1 - Last Post: 19 Sep 24, 15:50 Last Post By: Basil-Hunter
Basil-Hunter

Posts: 5
Registered: 14-Dec-2013
Facebook not able to pull preview images
Posted: 15 Sep 24, 13:53
I've noticed that albums that I've generated recently using jalbum 35.1 and Tiger Skin 5.11.3, fail to provide Facebook with a preview image and description text, when I type in the URL in a new post.

To help troubleshoot, I had Jalbum regenerate an album that behave as expected (made with jAlbum 34.2.1 & Tiger 5.4.1) into a test directory

Example that doesn't work. http://basil2.homeip.net/~basil/Test/
Example that does work http://basil2.homeip.net/~basil/GarlandApr2024/

comparing the index.html files made, I notice a couple of items:
1. the new version is using absolute links rather than relative links. Making trailing "/" in the Address field in Album Settings required
2. The URL's are using https rather than http. my server is not running in https mode, so I think this is main culprit
Basil-Hunter

Posts: 5
Registered: 14-Dec-2013
Re: Facebook not able to pull preview images
Posted: 18 Sep 24, 15:53   in response to: Basil-Hunter in response to: Basil-Hunter
Basil-Hunter wrote:
I've noticed that albums that I've generated recently using jalbum 35.1 and Tiger Skin 5.11.3, fail to provide Facebook with a preview image and description text, when I type in the URL in a new post.

To help troubleshoot, I had Jalbum regenerate an album that behave as expected (made with jAlbum 34.2.1 & Tiger 5.4.1) into a test directory

Example that doesn't work. http://basil2.homeip.net/~basil/Test/
Example that does work http://basil2.homeip.net/~basil/GarlandApr2024/

comparing the index.html files made, I notice a couple of items:
1. the new version is using absolute links rather than relative links. Making trailing "/" in the Address field in Album Settings required
2. The URL's are using https rather than http. my server is not running in https mode, so I think this is main culprit


So my current workaround is to run a multi-file search and replace with a text editor to look for “https://+mysite+” and replace it with “http://+mysite+”

I think a better solution would be for jalbum to respect the whole url including server type set in the Address field in Album Settings
Laza

Posts: 1,531
Registered: 6-Sep-2005
Re: Facebook not able to pull preview images
Posted: 18 Sep 24, 16:55   in response to: Basil-Hunter in response to: Basil-Hunter
Whenever a page running https: tries to access a file on your site, it will fail if you don't have HTTPS support. Might work in some cases, but all webpages are forced to use https today, otherwise, the visitors will see only security warnings.

I found an error regarding the "share image" and will update the skin soon.

You can use the Settings / General / Address field to provide a web address; the skin will not change this.
Basil-Hunter

Posts: 5
Registered: 14-Dec-2013
Re: Facebook not able to pull preview images
Posted: 19 Sep 24, 03:10   in response to: Laza in response to: Laza
I agree that trying to use https on a http server will most likely fail. This is the issue I'm running into. Nothing is requiring webpages to use https. None of the browsers I use require or are forced to use https, or even give warnings.

I have http:// specified in my Setting/General/Address field, but jalbum is still forcing https:// in the generated pages for the absolute links.

Out of curiosity, why the change from relative to absolute links for the share image?

Edited by: Basil-Hunter on 19 Sep 2024, 03:10
Laza

Posts: 1,531
Registered: 6-Sep-2005
Re: Facebook not able to pull preview images
Posted: 19 Sep 24, 09:32   in response to: Basil-Hunter in response to: Basil-Hunter
Using absolute links is a requirement for social sites. It's probably kind of a precaution to make newsfeed manipulations harder. I don't know the exact reason. When you provide the share image link relatively, Facebook says the image can't be found.
Basil-Hunter

Posts: 5
Registered: 14-Dec-2013
Re: Facebook not able to pull preview images
Posted: 19 Sep 24, 10:22   in response to: Laza in response to: Laza
that's odd, because the relative links still work on Facebook for me. It was switching to the absolute links and using https that broke the process for me.

--Basil
Laza

Posts: 1,531
Registered: 6-Sep-2005
Re: Facebook not able to pull preview images
Posted: 19 Sep 24, 11:52   in response to: Basil-Hunter in response to: Basil-Hunter
Perhaps they try to discourage people from using relative links but secretly they accept it. I can only work along their API specs.

I had to switch links to HTTPS because today almost all sites automatically redirect users to HTTPS. In this case, the external libraries, the fonts, and such will be refused to load, because a secure page is not allowed to load insecure content. In most cases, it manifests in a broken album. Perhaps I can add a switch to stick to HTTP. In this case, when your hosting provider turns on HTTPS redirection, your albums made with this setting will become broken.

Edited by: Laza on 19 Sep 2024, 14:56
Basil-Hunter

Posts: 5
Registered: 14-Dec-2013
Re: Facebook not able to pull preview images
Posted: 19 Sep 24, 15:50   in response to: Laza in response to: Laza
Having an option to use http, or just having the absolute links use the same method indicated in the address bar, would be beneficial to me.

I understand that if I change my webserver settings, that the albums would need to be remade, but the same is true for most other server settings, including if I changed domain names or even just moving the photo galleries into a subdirectory.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums