Wikipedia, which allows uploading media, deals with this by rendering svgs on the server side.