To set the equivalent of a src attribute of an img tag in CSS, we set the content property.
For instance, we write
<img class="myClass123" />
to add the img element.
Then we write
.myClass123 {
content: url("https://picsum.photos/30/30");
}
to select the img element with class myClass123
and set its image URL with content: url("https://picsum.photos/30/30");
.