How to dynamically change UI Image?

Cannot implicitly convert type UnityEngine.UI.Image' to UnityEngine.Sprite’

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Directions : MonoBehaviour {

	public Sprite overrideSprite;
	public Image image;
	// Use this for initialization
	void Start () {
		Debug.Log ("Started");
		image.overrideSprite = (Image)Resources.Load("up");
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}

I have an UI Image in my scene. I want to change it for button press. I don’t know how to change it via script.

image.overrideSprite = (Image)Resources.Load("up"); 
to
image.overrideSprite = (Sprite)Resources.Load("up");

The referenced script on this Behaviour is missing!

You shouldn’t need to convert your image to a sprite. Casting also doesn’t work.

Try the following instead:

public Sprite overrideSprite;
public GameObject object1;

// Use this for initialization

void Start () 
{
         Debug.Log ("Started");
         object1.GetComponent<Image>().sprite = overrideSprite;
}

Thanks @Mariol .
was searching this on the internet , nothing worked so far,
until i found your code. and it worked . thanks a lot;