Attribute of
<img>
What does <img dynsrc=""> do?
An early failed attempt to include native video playback in HTML.

An Early Attempt at HTML Video

The dynsrc attribute was part of an early failed attempt to include native video playback in HTML. The idea was to overload the <img> element with a video file, defined in dynsrc (dynamic source). If the browser supported the playback feature, the video would be shown. Otherwise, the regular image defined in src would be displayed.

<img src="flamingo.jpg" dynsrc="flamingo-movie"> 

Unfortunately, there were problems with this method. Not all browsers implemented it, and those that did implemented it differently. Most of all, the problem was simply that it wasn't the right time for widespread use of HTML video — download speeds were still slow, storage and bandwidth were still expensive, video was still hard to produce. The 'dynsrc` method never really caught on, and the attribute was written out of the HTML specification even before HTML5.

How to Embed Video in HTML Today

With HTML5, embedding video is as easy as using the <video> element.

<video controls>    <!-- Define one or more source files. The browser selects the best option. -->   <source src="/wp-content/uploads/flamingo-movie.mp4" type="video/mp4">    <!-- Anything outside of a source definition is shown if playback fails. -->   Your browser does not support the video tag. </video> 

To learn more about HTML5 Video, see our tutorial on HTML5 Media, as well as our page about the <video> element.