For info- there are other lights for rack or pannier mounting.
Basta have 2- one (zoom) has a light sensor and will switch itself on in low light, a movement sensor detects when it can switch off, the other (ray steady) more conventional. Both available here on Amazon.
Then there's the Anlun Delux Rear Pannier LED Light, Parkers Pannier Mounted rear LED both available at Parkers (Bolton).
The Torch Tail Bright 3LED Rear City Carrier Fit Bike Light is another
And I've seen others too, probably the best are among these five.