Although there’s no specific size limitation for your background image, there are a few best-practices you’ll want to keep in mind.
First is file size. Larger images take longer to download, so you’ll want to optimize appropriately.
The vast majority of screens are 1600 pixels wide and below, so you really shouldn’t need a width larger than that.
Your background image always fills the entire browser window without any gaps or white space. The image is scaled as needed but always retains its proportions (aspect ratio), regardless of window dimension or device orientation. The image will never distort, but parts of the image may be off screen on window and device dimensions that don’t have the same aspect ratio as the image itself.