Changing Image on Canevas - problem

Hi,
here is what i’m trying to do:

I have an item on the floor (sword).
The player take the item.
Now, i’m unable to set the sword image on the inventory UI canevas slot1 Image…

After testing multiples ways to solve the problem, I start to understand the root:
→ my sword have a Sprite Renderer and i’m trying to change it into an Image…

Then, can someone tell me a way to “show the sword” on the slot1 of my canevas/inventory please?

Thanks!

[SOLVE]
I found an old post of 2018 whith that answer:

 public Sprite newImage;
private Image myIMGcomponent;
// Use this for initialization
void Start () {
     myIMGcomponent = this.GetComponent<Image> ();
     myIMGcomponent.sprite = newImage;
}
// Update is called once per frame
void Update () {
    
}

Credits for that goes to:
@hameed-ullah-jan