Changing UI Sprite Image From Code

Hi!

I have a small UI Image with the canvas render set to render Camera. I have all of my sprite .png images in a folder. I need to change the image in the UI to another image based on a button press. How do I achieve this?

public Sprite newSprite;

void Update () 
{ 

if (Input.GetKeyDown(Keycode.Plus))
GetComponent(SpriteRenderer).sprite = newSprite;

 }