AssetUrlFilters

Version 0.9.1+

Encourages use of asset_url or img_url filters to serve assets. You should deliver as much as you can from the Shopify content delivery network (CDN). Using the same host for your assets avoids unnecessary HTTP connections and allows the server to prioritize the delivery of blocking resources using HTTP/2 prioritization. Learn more about hosting assets on Shopify servers.

Examples

The following examples contain code snippets that either fail or pass this check.

✗ Fail

In the following example, a resource is retrieved from a non-Shopify CDN:

In the following example, an image tag is used without an img_url filter:

✓ Pass

These examples use the asset_url or img_url filters to load files from a theme's assets folder from the Shopify CDN:

Disabling this check

This check is safe to disable. You might disable this check when the remote content is highly dynamic.