Skip to main content

MissingAsset

Makes sure that all asset files referenced by the asset_url filter exist.


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

In the following example, there is no corresponding picture-does-not-exist.png file in the assets directory of the theme:

{% assign logo_url = 'picture-does-not-exist.png' | asset_url %}
<img src="/content-v2/assets/images/{{ logo_url }}" alt="Logo" />

In the following example, picture-in-asset-dir.png exists in the assets directory of the theme:

{% assign logo_url = 'picture-in-asset-dir.png' | asset_url %}
<img src="/content-v2/assets/images/{{ logo_url }}" alt="Logo" />

The following example contains the default configuration for this check:

MissingAsset:
enabled: true
severity: error
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?