Use 72 x 72 pixels .jpg or .png files to achieve best results.
You can also use animated GIFs.
To change the icon:
1) Highlight the Action or Key you want to change
2) Locate the default icon on the bottom left corner of the screen (the location is highlighted in red in the screenshot above)
3) Click on the Default icon to select the image.
Elgato Stream Deck Key Creator
You can also use the Elgato Stream Deck Key Creator web-based app to easily create and modify graphics: