May 09, 2023

Changes to Asset URLs

Update: In the coming weeks we'll start serving some store assets (e.g. images, JS or CSS) from a shop’s store domain rather than a Shopify CDN domain. Certain assets will continue to use the old URL format…, while the rest will be converted to a new URL format:…. The new URL format can be seen in action on the demo store The old… URL format will continue to work indefinitely.

The new format will be returned by liquid tags and will be present in Shopify-rendered storefront HTML, but the old format will continue to be used in all API responses. This new asset delivery approach is not used on headless shops, which will continue to use….

The domain used in the new URL format is dependent on the request context: it may be the store’s permanent domain or a custom domain depending on which one a buyer visits. Custom code that depends on the old URL format may need to be updated to support both formats.

In addition, new images associated with products now use the /files path format rather than the previous /products. Previously uploaded product images will continue to use the /products path.

These changes are being made to provide a variety of benefits:

  • Improved page load times on storefronts to provide a better buyer experience and improve conversion rate. Improvements to page load speed are potentially on the order of hundreds of milliseconds.
  • Improved security: because we don't need to allow for cross-origin assets from our CDN, we can use more restrictive content security policies (CSP) and cross-origin resource sharing (CORS) policies.
  • Less Shopify branding on merchant domains.

Action Required:

  • Ensure that any custom code you may have is free from hard-coded assumptions on the old URL format