Command to rotate image but skip error

I use this command Image ROTATE=90.
Can you add argument to skip error (e.g. when trying to rotate non image files) ?

If it's just non-image files being selected that you need to avoid, you could add a line to deselect them first?

Yes, but I have already had the case where images were locked by another application.