So I havent been able to track down a article of how you change the name of my images coming out of my media library. The mynewsite is the site running my node server calling my prod-cd content. Example: https://prod-us.sitecoretree.com/-/media/images/project/common/logos/2019-logo.ashx and I need them to resolve but I want my URL to be https://www.mynewsite.com/-/media/images/project/common/logos/2019-logo.ashx or I guess I could just have it set as /-/media/images/project/common/logos/2019-logo.ashx Almost like a virtual directory type of setup.
This would be basically the same as using a CDN. There is a config file for this in App_Config/Include/Examples/CDN.config.example Basically, the settings you are looking for are:
- Media.AlwaysIncludeServerUrl: Ensures that all media links will always include the full server URL
- Media.MediaLinkServerUrl: Specifies what the server URL (including the scheme and hostname) should be for all media links
The rest of the settings in CDN.Config.example are probably not necessary for your use case, but may be necessary. They are documented in that config.
Note: Make sure you always use built-in methods for retrieving media URLs, or else you won't be leveraging this functionality, and all bets will be off at that point.