The Divi Theme allows you to add background images to Divi Builder sections, rows and modules. By default, Divi doesn't allow shortcodes in the background image URL field. If you want to use a shortcode to generate your background image URL (or part of it), here's how...
This site is supported by affiliate links to products that I think may be of interest / use to you. I may receive a commission on sales of these products.