Twig error "Uknown image_style filter", but the filter isn't missing I'm migrating a site to a new host.  On the front end, I see...

Twig_Error_Syntax: Unknown "image_style" filter. in Twig_ExpressionParser-&gt;getFilterNodeClass() (line 57 of /var/www/prod/web/themes/mytheme/templates/paragraph--paragraph_image_block.html.twig).


However, I checked the filter referenced in the error, and the filter is not missing.  I see the filter at admin/config/media/image-styles and its machine name is spelled correctly in the template.  I have tried rebuilding the cache.  Why is this filter unknown?

Here is line 57 in the template: 

{% set img_url = file_url(content.field_paragraph_image['#items'].entity.uri.value | image_style('max_1300x1300')) %}


The 'max_1300x1300' filter isn't missing.
The error message isn't complaining about a missing Drupal image style - it's complaining about a missing Twig filter named image_style.

That filter doesn't exist in Twig/Drupal core, but it does exist in the Twig Tweak module. Make sure that module is available and installed, and the error should disappear.

If you've never had Twig Tweak installed then it's probably custom. In that case search your codebase for Twig_SimpleFilter('image_style' and you should find the culprit.