---
schema_version: "1"
id: 87d6ee6e23768edc8743f3e020ac1e937b686ee6c81747d2d5ea122f58b57664
title: Generate Consistent Image URLs in Jobs with Job Hostnames
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_b2c_job_hostnames_image_urls.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_b2c_job_hostnames_image_urls.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e8969847793fd480aa710daf46e0d4a3c6db10b1c8595a5ad80fee93638b08e2
description: 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.
products:
  - Cross Cloud
release: "262"
---
# Generate Consistent Image URLs in Jobs with Job Hostnames

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.

#### See Also

- [_Salesforce Help_: Honor Job Hostnames in Image URL Generation](https://help.salesforce.com/s/articleView?id=cc.b2c_job_hostnames_image_urls.htm&language=en_US)