A client was having problems with some of his article's images not showing on Linkedin. After a lot of headache investigating this, I found out that the images that were not showing had a longer name. So it turns out that if the URL is longer than 118 characters, Linkedin won't scrape it and show it.
This isn't a problem for Facebook, Twitter, etc.
Is there any way possible to reduce the length of the URL besides changing the name of the file. For example:
Hey @kris, thanks for sharing this with us. It is not recommended to modify the URLs of the media files. Especially for images, as they would lose the automatic image compression. We've discussed this in different threads. This one for example:
Can you tell us exactly where you're adding the image URL and what error you're getting? if you could embed a screenshot it'll be really useful.
@Phil Sadly, I couldn't find an official documentation - it was mentioned in a comment with 0 upvotes on Stack Overview. So take it with a grain of salt, but I tried it several times (shortening the name of the image file, which shortens the url itself) and it worked.
It wasn't a problem every single time, only sometimes. Probably something that you could explore if you had a spare hour on a Friday afternoon. It's only a problem in Linkedin fyi
OK, I'll look into this further. We are working on the ability to disable imgix per repo which would stop this but you'd lose all the image compression.
I'll talk with the team about the imgix IDs and what our options are.
Since it's a case of linkedin not accepting certain image formats, then luckily with the imgix integration you can dictate what format specific images are output in:
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
12
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
To add context to this issue, I contacted Linkedin as I was pretty sure that og:image tag and the url within were perfectly fine and yet Linkedin was not able to fetch the image.
Now this encoded url basically replaces "+" with "%2B" which breaks the path to the image and they are not able to fetch it.
I have further asked them why they only need to encode a part of the url and not the full url. And if they encode the url wouldn't that anyways break the path to the image. To this message I am awaiting reply.
Hopefully, we are able to solve this issue once and for all.
You will need to speak with your web developer to have them take a look and see why your URL cannot be encoded properly. We are not able to fix that on our end. Unfortunately, we do not have any workarounds we can provide for you for this. So if you are not able to speak with your web developer to take a look and make changes, we just are not able to pull the image. We also cannot manually add an image to your post on your behalf.
OK, I’m guessing they’re aware of this issue then. It’s not the first time we’ve seen problems with how Linkedin handles images.
The only workaround I can think of is something like:
This would allow you to create a local path for the image to get around the issue. I don't know what technology you're using though and I haven't tested this.
In our case the image was not showing on LI when the image file name had whitespaces i.e my first blog image while myFirstBlogImage would work.
Is there a way to manipulate the file name, to remove whitespaces (and potentially special characters, which I haven't test but it could cause the same issue) when an image is uploaded ?