I saw an article that asked the same question a few years ago, but I couldn't solve it after seeing the article, so I want to ask the question again.
I want to get the css background-image url value as an HTML data-attribute and use it.
.thumb{
background-image: attr(data-background);
}
<div class="thumb" data-background="https://via.placeholder.com/300"></div>