Please use ===
I think your test must be on media backend type because, I think, in your current case you have to ignore files not only images