You can use the Backgrounds module of GP Premium:
https://docs.generatepress.com/article/backgrounds-overview/
As for image file, ideally, if you can use SVG, please do so.
SVG files are light-weight, vector-based image meaning, you won’t see any image degradation when it is stretched for different viewports. Knowing this, you don’t have to worry about its resolution size.
Next best thing would probably be webp, but if you must use raster images like PNG or JPG, you’ll have to upload huge files for bigger screens.