How can I leave trail from a UI Image movement?

I’m changing the rectTransform.position of a UI Image. How can I leave a trail from this movement?
I tried without much success to use the Line Renderer and Trail Renderer, I’m not sure if they work with UI components.

To anyone wondering. The solution goes by using the Canvas Renderer as Screen Space - Camera.
On my project I’ve opted for using a separate camera (also projected in perspective mode) creating a separate layer for the UI.