1. Upload an image
  2. Paste the code below into MakeCode's JavaScript tab.

No need to manually create a sprite first. The code creates it for you.