Add images and other media to the docs
Edit on GitHubThis document describes how to add images and other media when contributing to the docs.
To keep the repository lightweight, the media is stored separately in a dedicated Amazon S3 bucket.
For now, only the docs team can add media directly to the bucket. While we are working on a way to enable you to add media directly, you can add media as comments in your PRs, and we’ll add it to the documents for you.
Media guidelines
When sharing media, use any convenient form of sharing: directly upload content or provide a link.
For images, any format is accepted. For animated content, MP4 is preferred.
- For more guidelines, see Google’s guide to media.
- For instructions on adding diagrams, see Add and edit diagrams.
Add media to a PR
- Create a PR for the document you want to add media to using one of the following guides:
In the document you are creating a PR for, make sure to add a few empty lines in the place where you want to add media to. We’ll use these lines to add the code for displaying the media.
- On the PR’s page, go to Files changed.
- Hover over an empty line you want to add the media to. This displays a highlighted + symbol next to the line number.
- Click on the highlighted + symbol. This opens a comment pane.
- You can paste, drag-and-drop, or click Paste, drop, or click too add files button to add the media.
- Click Add single comment. This adds the comment to the PR and displays the picture. When we review the PR, we’ll see the comment and add the media for you.
Thank you!
For submitting the form