Score:0

Sharing articles on Social media loses the images after posting

pg flag

This seems to have only happened recently. Has anyone found a fix? I'm using D7 with Metatag, Metatag:Facebook & Metatag:Opengraph.

However, I'm not convinced the issue is with any of these modules, and here is why:

When I share an article on facebook (other platforms are doing the same), the image shows correctly in the preview but when it is displayed on a user's profile, either no image or a "safe image" from the platform's CDN is displayed.

When shared on Facebook, the image is replaced with something from FB's CDN:

<img height="74" width="74" alt="BBC One releases first look at new thriller Vigil" class="datstx6m pmk7jnqg j9ispegn kr520xx4 k4urcfbm" referrerpolicy="origin-when-cross-origin" src="https://external-lcy1-1.xx.fbcdn.net/safe_image.php?d=AQHbIThpTniFRwWa&amp;w=74&amp;h=74&amp;url=https%3A%2F%2Frts.org.uk%2Fsites%2Fdefault%2Ffiles%2FRTS_logo.png&amp;cfs=1&amp;ext=jpg&amp;ccb=3-5&amp;_nc_hash=AQHydfUnOTwoNOs0">

When shared on Linked in, the image is replaced with something from LI's CDN:

<img width="308" src="https://media-exp3.licdn.com/dms/image/sync/C4D27AQEfVR4ye-RMcA/articleshare-shrink_480/0/1622988826826?e=1623243600&amp;v=beta&amp;t=8PksYkc4Zp8EI-ENytwmeh4x-hjIQKT1MBLtq_1r2SU" loading="lazy" height="164" alt="" id="ember91" class="ivm-view-attr__img--centered pab-featured-item__image lazy-image ember-view">

the preview image when I enter the URL

article being posted

The image has been replaced !

blur avatar
bn flag
Have you tried the facebook or twitter debugger? https://cards-dev.twitter.com/validator https://developers.facebook.com/tools/debug/ Also, what does the og:image meta tag show? `<meta property="og:image" content="https://www.whitehouse.gov/wp-content/uploads/2021/01/wh_social-share-1100x740.png" />` Is there anything in your network that could be blocking/rewriting ULRs from social media accessing images? Because the images are shared outside of the network, I always try to prove full URLs to the social sharing image. Relative paths can be problematic.
pg flag
I've tried both those debugging tools and the sample it displays shows the image.
pg flag
`<meta property="og:image" content="https://rts.org.uk/sites/default/files/styles/9_column_landscape/public/p09gft73.jpeg?itok=VXhyYRK9">`
Score:0
pg flag

So, it turned out that it was a combination of a missing OG:image tag due to the metatag module looking at the incorrect image field, but even after I'd fixed that - it's worth noting that Facebook (and other platforms) cache the sample images that are used - it appears that they cahe the image even if a different user has already shared it, so you may need to wait to see the new image

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.