Probably just through the URL like &bgimage=https://i.imgur.com/pain.jpg or &bgvideo=https://your.host.com/video.mp4.
I do forsee a lot of issues with that, like people using a portrait mode photo or video and wondering why it doesn't fit - and then blame me.