While most of the time, it is standard practice to upload videos to WordPressâ Media Library for inclusion on a site, occasionally it may be necessary to embed the video directly into a page. Two common reasons for this are:
- The file is large and risks impacting site performance.
- It is not possible access the original video file itself.
Gutenberg makes this super easy. Firstly, youâll need to copy the embed link from YouTube. Click the âShareâ button underneath your chosen video. A pop-up window will appear. Click âCopyâ next to the embed link in this window.
Next, navigate to the page editor where you want to embed the video.
- Add a new block either from the + button at the top of the page or beneath an existing block in the page body.
- Select the âYouTubeâ block.
- You will be prompted to paste the embed url in a text field. Do this and click embed and your video will appear in place on the page editor, complete with poster image pulled from YouTube itself.
Alternatively, as long as you make sure you are in a new empty block, simply pasting the embed url will be enough for the editor to automatically embed the video for you. Helpful!