Hi. I'm trying to resize only jpg and png files. Can anyone help with the syntax of this code please:

<img src="{{ if (extension | contains:"png jpg") }}{{ glide:url width="1800" }}{{ else }}{{ url }}{{ /if }}"/>