How to set background image url = variable

Hi! I’m trying to change a background image by using a variable. Is this possible?

const picture_url =; = "url(’${picture_url}’ ) ";

you can do this by using the following syntax :`background-image:url(${image_url})`;

I applied background image to the body .you can select any element you want to set background-image.

Thanks a lot. I’ve never seen cssText before, will use it from now :slight_smile: