---
title: DeprecatedFilter
description: Checks whether a theme uses deprecated filters.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter.md
api_name: liquid
---

# Deprecated​Filter

Discourages using deprecated filters in themes.

***

## Examples

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

### ✗ Fail

```liquid
.site-footer p {
  color: {{ settings.color_name | hex_to_rgba: 0.5 }};
}
```

### ✓ Pass

```liquid
.site-footer p {
  color: {{ settings.color_name | color_modify: 'alpha', 0.5 }};
}
```

***

## Auto-correction

Theme Check can correct usage of the deprecated `img_url` filter using the `--auto-correct` flag. When the flag is specified, Theme Check automatically replaces instances of `img_url` with [`image_url`](https://shopify.dev/docs/api/liquid/filters/url-filters#image_url) where possible.

***

## Options

The following example contains the default configuration for this check:

```yaml
DeprecatedFilter:
enabled: true
severity: warning
```

| Parameter | Description |
| - | - |
| `enabled` | Whether the check is enabled. |
| `severity` | The [severity](https://shopify.dev/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
