I was playing a Rocket's Scyther, and my opponent was playing a Ditto. He
used Shadow Images. I retreated my Rocket's Scyther and played a Brock's
Onix. The question then arose as to whether his Shadow Images still applied.
I claimed that card stated "This effect lasts until Rocket's Scyther takes
damage", and since he was now a Brock's Onix, it no longer applied. He felt
that his attack was still in effect. Could you give a ruling please?

Thank you, Mark Yudkin

Shadow Images is an attack which remains on the Pokemon as long as it's active (and does not take damage).  It's kinda like an invisible counter that goes on the Pokemon.  While the Ditto remains active, it continues to have that counter, so yes - Ditto can still utilize the benefit of Shadow Images, regardless of what Pokemon your opponent has.

Scott