从Wordpress自定义插件php文件内部链接的CSS背景图像

I'm trying to use CSS background-image url('') link in my Wordpress plugin php file. None of the images are showing and I'm not sure how to make it work. It's for a client so I need the images to be able to be installed along with the plugin, not manually placed anywhere in the theme folder.

I've tried putting images in the theme folder but it still doesn't work. I've tried linking to the url by storing it in a variable ($url).

 php:
 $url1 = 'image.png';

 css: (in same php document)
 .ch-img-2 {
background: white url('<?php echo $url2 ?>') no-repeat;
    background-size: contain;
    background-position: center;
 }

 also tried: 

 .ch-img-1 {
background: white url('<?php image.png ?>') no-repeat;
    background-size: contain;
    background-position: center;
  }

From WP forums:

URLs in CSS files are relative to the CSS file and not the page URL. But URLs in CSS that is inline (like in a tag or even a style attribute are relative to the page URL. So your plugin should put the CSS in a file and put the images relative to that, and then enqueue the style file only on pages where it is needed. If you don’t, you’ll have to generate the absolute URL and put it in the CSS that is inline.