Yoast / Yoast/wordpress-seo

"og:image" not working on multisite, when using the Network Media Library plugin

Open
#20,008 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: multisite component: opengraph component: social
Dominant language
JavaScript
Stars
2k
Forks
975
Avg merge
3d 13h
Merged PRs (30d)
36

Description

Please give us a description of what happened

The Network Media Library plugin allows users on a multisite network to share a single media library, instead of having to manage a separate media library for each site on the network.

However, the Yoast SEO plugin is not able to detect images across sub-sites. This causes issues like the "og:image" tag not working properly.

To Reproduce
Step-by-step reproduction instructions
  1. We created a test multisite installation with 3 sites with Yoast SEO.
  2. We installed the Network Media Library plugin. By default, this plugin uses the media library from site ID number 2 for all other sites.
  3. We went to side ID number 2 and uploaded an image through its media library.
  4. We then went to one of the other sites (in our case, site ID 3) and created a new post. In the Social tab of the Yoast metabox we selected the image we uploaded in step number 3.
Expected results
  1. I expected the image to be shown in the og:image tag.
Actual results
  1. The image is not recognized and the tag is not added to the post.
Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Used versions
  • WordPress version: 6.1.1
  • WordPress Theme: TwentyTwenty One
  • Yoast SEO version: 20.3
  • Relevant plugins in case of a bug: Network Media Library version 1.5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with WordPress multisite, Yoast SEO, and the Network Media Library plugin, using an image uploaded on site ID 2 and selected from site ID 3's Social tab. Trace how the selected image is recognized across sites and verify that the post emits the expected og:image tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
wordpress
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.