Compliance with recent Asset URLs changes

This question is regarding a recent entry in the Changelog:

https://changelog.shopify.com/posts/changes-to-asset-urls

I just want to verify my understanding. It seems that due to this change one shouldn’t have hardcoded assumptions about the link returned from a liquid tag such as

{{ 'theme-onboarding.css' | global_asset_url | stylesheet_tag }}

However, from the following in the changelog,

The old cdn.shopify.com/… URL format will continue to work indefinitely.

I understand that hardcoded links themselves will continue to provided the expected resources.

Is this correct? Hardcoded cdn.shopify.com links (in themes or elsewhere) will continue to work but one shouldn’t expect this form to be returned from Liquid?

I would like further clarification on this as well. Currently, I fetch a lot of resources from my liquid files using https://cdn.shopify.com/s/files/etc/blah.png, but when I attempt to load them using https://shop.mywebsite.com/cdn/s/files/etc/blah.png or https://shop.myshopify.com/cdn/s/files/etc/blah.png I receive a 404.

When will this change take effect?

Me too i really want to know, even the customer service people dont have a good idea

Hello @Josh_Davis1

Hardcoded cdn.shopify.com links will continue to work as expected, and you can still use them in your themes or elsewhere in your Shopify store. These hardcoded links will not be affected by the recent changes in the asset URL structure.

The Liquid filter global_asset_url is used to generate the correct URL for assets within your theme files. It ensures that the asset URL is compliant with the new asset URL structure. However, if you have existing hardcoded cdn.shopify.com links, they will still function correctly, and you don’t necessarily need to change them to use the global_asset_url filter.

Hardcoded cdn.shopify.com links will continue to work, but the global_asset_url filter is recommended for generating compliant asset URLs within your theme files, especially if you want to ensure compatibility with future updates and changes in the Shopify platform.

That’s what I suspected but wanted to get some feedback on it. Thanks for your response.

Is there any way that you can expound on that with some examples or something like that for us visual learners? I just need an example or two to understand how to update the links that need it. Is this something that will stop working if we don’t make the changes suggested when you hover over the zigzag underline?