How to Embed a Video in WordPress

Last updated on by admin

The core WordPress has a video feature which allows you to embed video files using a simple method. This feature was added in WordPress 3.6 which makes it easier for you to embed video files without installing a plugin.


The easiest way to embed a video is to copy and paste it into your post/page editor.

Insert from Media Library

While you are writing content you can click on the Add Media button to upload and insert a video into the post/page.

screenshot showing how to insert a video into a post or page from the media library in WordPress

Once the video is embedded you will be able to see a preview of the thumbnail even before publishing it.

video embed preview inside a WordPress post or page

Video Options

Embedding a video by directly pasting the URL is easier. But if you use the video shortcode you will have more customization options. In fact, WordPress automatically creates a video shortcode for you when you insert a video from the media library. You will need to switch to the “text” editor to see the actual shortcode.

Currently the video shortcode supports the following options.


This is the source of your video file. It is recommended to use mp4 file format since it is compatible with most browsers (including browsers running on mobile devices).

[video src=""]

You can specify other file formats to allow for graceful fallbacks.

  • mp4
  • m4v
  • webm
  • ogv
  • wmv
  • flv

[video mp4="" ogv="" mov=""]


“poster” attribute defines an image to show as placeholder before the video plays.

[video src="" poster=""]


“loop” attribute allows for the looping of video. If set to “on” the video will start over again every time it is finished.

[video src="" loop="on"]


“autoplay” attribute causes the video to automatically play as soon as it is ready.

[video src="" autoplay="on"]


“preload” attribute defines if and how the video should be loaded when the page loads. By default it’s set to “metadata”.

  • metadata – only metadata should be loaded when the page loads
  • none – the video should not be loaded when the page loads
  • auto – the video should be loaded entirely when the page loads

[video src="" preload="auto"]


“width” attribute defines width of the video.

[video src="" width="640"]


“height” attribute defines the height of the video.

[video src="" height="360"]

It’s better not to specify a width and height in the shortcode. WordPress will fit the video in the content area with the best possible width and height (keeping the aspect ratio). This will also make the video responsive.

GET 60% OFF WordPress Hosting Here

3 thoughts on “How to Embed a Video in WordPress”

  1. Hi
    How can I also get an End Poster Image (endscreen) with a link. Anyone knows a plugin for that?
    Thansk 🙂

    1. @Johnny, the poster is an HTML5 video attribute that can only be shown until the user clicks on the play button.

      1. Thank you Admin

        What I’m looking for is a image that comes after the video. Like an Ad.
        Is there a WP plugin for that?
        Johnny 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *