Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The loading property of the HTMLMediaElement interface provides a hint to the browser on how to handle the loading of the media which is currently outside the window's visual viewport. This helps to optimize the loading of the document's contents by postponing loading the media until it's expected to be needed, rather than immediately during the initial page load. It reflects the <audio> element's loading content attribute or the <video> element's loading content attribute.
A string whose value is one of eager or lazy. For their meanings, see the HTML <audio loading> or <video loading> reference.
The addVideoToList() function shown below adds a video thumbnail to a list of items, using lazy-loading to avoid loading the video from the network until it's actually needed.
| HTML # attr-media-loading |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Mar 30, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.