Disclaimer: always have a backup before doing any kind of optimisation to your website. Sometimes things break, so it’s important to have a save point to go back to.

Video backgrounds:

Avoid video backgrounds if possible.

If you really want one, either keep the file very small (ideally <1mb), or load it from a 3rd party player like Vimeo or YouTube. Here's a tutorial on how to do this: Adding Vimeo Video Backgrounds To Divi

Videos on page:

It’s best to embed videos from a 3rd party website (e.g. Vimeo, YouTube etc), rather than adding the file directly to the website. This is so they don’t have to load from your server.

Even though embedding videos is a better way to add them, it does also come with some of its own problems.

Every time you embed a video it will increase the number of requests your browser will make when loading the page. YouTube for example has 4 requests per video you embed. This might not sound like a lot, but they can really add up!

To get around this, you can lazy load the videos. This means only the cover image loads to start with (1 request), then the remaining requests are triggered/loaded only when the play button is clicked.

If you use WP-Rocket, they have a setting to lazy load videos, but unfortunately, this isn’t compatible with Divi. If you’re comfortable with some basic code editing, this is a great tutorial on how to do it without a plugin: How to lazy load YouTube video embeds in WordPress