Setting a header image is optional, but some nice visuals can help you a great deal in telling your story. The size of the header varies on different devices and screen sizes. There is no ideal size for your image. As long as it is at least 1500px wide and 500px high you’re quite safe.
Make sure the thing you want to show is in the middle of the image to prevent it from being cut off on smaller screens.