Max File Size
Identifies theme files that are larger than Shopify's maximum file size for their path. This check applies to Liquid, JSON, and asset files in size-limited theme directories, and ignores files in the _drafts directory.
Asset file limits use the full UTF-8 byte size. For non-asset file limits, Theme Check doesn't count bytes inside {% schema %} tags toward the file-size limit.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
In the following example, snippets/card.liquid exceeds the 256 KB limit for the snippets directory. The markup is abbreviated here:
snippets/card.liquid
Anchor to ✓ Pass✓ Pass
In the following example, an oversized JSON template is ignored because it's in the _drafts directory:
_drafts/templates/index.json
Anchor to OptionsOptions
The following example contains the default configuration for this check:
| Parameter | Description |
|---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
The following file-size limits are enforced:
| File path | Limit |
|---|---|
assets | 20 MB |
locales | 1.5 MB |
config/settings_data.json | 1.5 MB |
config/settings_schema.json | 512 KB |
templates/*.json | 512 KB |
sections/*.json | 512 KB |
blocks | 256 KB |
config | 256 KB |
layout | 256 KB |
snippets | 256 KB |
templates | 256 KB |
sections | 256 KB |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.