rectangle element with image background in svg

Is there any way to put multiple images into SVG?
The best solution for me seems to be placing a RECT object that will have a photo as a backgrund but its not working.

example:

<svg width="500" height="500">
  <rect width="100" height="100" class="img1" />
  <rect width="100" height="100" class="img2" />
</svg>

and

 .img1 {
     background-image: url("../assets/panel.svg");
 }