Access the url of the image of the advert

Hello, how can I access the url of the image of the advert and then use it.
To better understand what I want I do the same but with blog posts , I use the image for the banner.

$thumb_url = get_the_post_thumbnail_url( $thumb_size );
$thumb_style = is_single() && has_post_thumbnail() ? 'style="background: url('.$thumb_url .') no-repeat scroll center center / cover"':'';
<div <?php echo $thumb_style;?> class="banner theme-banner-breadcrumb">

How could I do this in the ads?


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer