MissingAsset
Makes sure that all asset files referenced by the asset_url
filter exist.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
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" />
Anchor to ✓ Pass✓ Pass
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" />
Anchor to OptionsOptions
The following example contains the default configuration for this check:
MissingAsset
enabledtrue
severity error
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?