When B2C Commerce generates image URLs in a job context, such as a catalog export, it can now use the job hostnames from your site's aliases file. These URLs match your other job-generated URLs, so you no longer need custom code to correct the hostname.
Where: This change applies to B2C Commerce.
When: This change is available with the B2C Commerce 26.7 release.
Why: When B2C Commerce runs a job, there's no storefront request to determine the
hostname. Previously, the MediaFile Script API methods that generate image URLs
didn't apply the job-hostnames configuration from your site's aliases file when
they ran in a job context. Instead, they fell back to the default instance hostname. As a result,
image URLs in feeds and other job output sometimes used a different hostname than the pipeline
URLs, and merchants had to write custom code to correct the hostname.
How: This behavior is off by default. To turn it on for your environment, contact
Salesforce Support. When it's on, the MediaFile.getImageURL(),
MediaFile.getAbsImageURL(), MediaFile.getHttpImageURL(), and
MediaFile.getHttpsImageURL() methods use the job hostnames from your aliases
file when they run in a job context.