Changing the image of a UI element

I am working specifically with buttons. I would like to change the “source image” variable but I am unable to access the “Image” class.

You may have the same issue as I have, working with Mac and mono develop, the Image class that it finds by default is the abstract class that come from another namespace.

Despite adding the proper namespace on top (UnityEngne.UI) it still won’t get it.

So only solution is to provide the full path:

 UnityEngine.UI.Image image = GetComponent<UnityEngine.UI.Image>();

Annoying but no other way.