In the case of room upgrades, it is possible the client is trying to render the room create event, but the user has never been in the old room. This results in an error because the PermalinkCreator cannot possibly figure out a room ID.
Instead, we'll feed the creator an alternate room ID to try if the room object can't be provided.
Fixes https://github.com/vector-im/riot-web/issues/9636
This allows Webpack to insert the proper image URL after builds steps like
adding a hash and so on. The path you supply to `require` is relative to the JS
source file, just like any other would be.