Use CDN for media

In the docs ( it says we can use a CDN for the sites media and assets files.

How is that done in reality?

The assets I understand, them files we create and saves in our dev environment, nothing strange there. But the media files, they are created on the fly, like cache. If the media directory is on a other server (CDN), how is the files to be created/generated there?

Any tips?

You can find an example in the repo


Thanks for the tips. I’ll look into it.