About Saving Visitors' Bandwidth on a Website with Videos

To avoid preloading all video data in <video> tags, use one of the following approaches with the preload attribute:

Show a placeholder image

<video preload="none" poster="{{ post.video_cover.url }}" controls>
    <source src="{{ post.video.url }}" type="video/mp4" />
</video>

Show the first frame of the video

<video preload="metadata" controls>
    <source src="{{ post.video.url }}" type="video/mp4" />
</video>

Tips and Tricks Development Optimization Performance Bandwidth Django 6.x Django 5.2 Django 4.2 HTML5