AddComponent to UI image ?!!

I want to add a script to an ui image , but i’m geting an error (UnityEngine.UI.Image does not contain a definition for `AddComponent’ and no extension method AddComponent’of type UnityEngine.UI.Image could be found) …
when i add the script manually in hierarchy it’s work fine .

void MoveDealtCard()
{
    var hand = GameObject.Find("Hand");
    Sprite newCard = DealCard();
    // check card is null or not
    if (newCard == null)
    {
        Debug.Log("Out of Cards");
        showReset = true;

    }

    Image imageInstance = Instantiate(imagePrefab);
    imageInstance.sprite = newCard;  // Assign the first image of the list to the img prefab.
    imageInstance.transform.SetParent(hand.transform, false);
    imageInstance.AddComponent<DragCard>();

}

Components are added to GameObject instances. Image is not a GameObject instance but it is a component in a certain game object. Access that game object via the image instance and then add the desired script:

GameObject go = imageInstance.gameObject;
go.AddComponent<DragCard>();