No, you cannot use wildcards in IF. It does not support it in any way. The only way to do what you want to do is to either use Contains or StartsWith like this:
%StartsWith(items,'<img class',False) OR Contains(items,'<img width',False)%
I've included both StartsWith and Contains in there for the sake of demonstrating both of them, but you can also make them both use the same operand. The 'False' is there to indicate that it should not ignore case (i.e. the condition is case sensitive).
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.