Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/contributors/documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,28 @@ An example config for using Visual Studio Code and the Prettier extensions:
Depending on where you are viewing this document, the brackets may show as double. The proper format is just a single bracket.
</div>

### Images

Images displayed in the Block Editor Handbook must be hosted in the [developer.wordpress.org](https://developer.wordpress.org/) Media Library, not linked from GitHub.

Images linked directly from GitHub (for example, URLs starting with `https://raw.githubusercontent.com`) are subject to rate limiting and can fail to load once the documentation is synced to the Block Editor Handbook. Hosting them in the Media Library avoids this.

To add an image:

1. Upload the image to the Media Library on developer.wordpress.org. This requires additional permissions—if you don't have access, ask in the `#docs` channel in [Make WordPress Slack](https://make.wordpress.org/chat) for assistance.
2. Copy the URL of the uploaded image. It should look something like `https://developer.wordpress.org/files/2026/06/your-image.png`.
3. Reference the image in markdown using that URL, with descriptive alt text.

For example:

```md
![Descriptive alt text](https://developer.wordpress.org/files/2026/06/your-image.png)
```

<div class="callout callout-info">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we recommend this, or ask folks to upload a PNG version instead, but keep the original SVG? I'm not sure myself, which is why I'm asking.

@juanmaguitar juanmaguitar Jun 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me the key distinction is display vs. download:

  • Displayed images (rendered in the handbook) should be raster and hosted in the Media Library, since those are fetched on every page render and are exactly what the rate limiting affects.
  • An SVG that's meant to be downloaded (for example, a logo offered as a vector file) can stay in the repo and be linked from GitHub, because a download link is only hit when someone clicks it — not on every render — so it isn't subject to the same rate limiting, and you genuinely want the real vector file there rather than a PNG.

So for a displayed SVG, I think the recommendation should be as you mention: upload a PNG version to the Media Library and reference that, while keeping the original SVG in the repo.

I've updated the callout to reflect this:

The Media Library does not accept SVG uploads. If an SVG is displayed in the handbook, upload a raster version (such as a PNG) to the Media Library and reference that. Only keep an SVG in the repository and link to it directly when it is meant to be downloaded (for example, a logo offered as a vector file) — a download link isn't fetched on every page render, so it isn't affected by the rate limiting.

The Media Library does not accept SVG uploads. If an SVG is <strong>displayed</strong> in the handbook, upload a raster version (such as a PNG) to the Media Library and reference that. Only keep an SVG in the repository and link to it directly when it is meant to be <strong>downloaded</strong> (for example, a logo offered as a vector file)—a download link isn't fetched on every page render, so it isn't affected by the rate limiting.
</div>

### Video embeds

Videos in the Block Editor Handbook need to be hosted on the [WordPress YouTube channel](https://www.youtube.com/@WordPress) as unlisted videos. This process requires additional permissions. Reach out in the #marketing Slack channel for assistance.
Expand Down
Loading