JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#">This is the text</a>
JavaScript
$(document).ready(function(){
$("a:contains(This is the text)").css("content", "url('https://i.picsum.photos/id/237/200/300.jpg?hmac=TmmQSbShHz9CdQm0NkEjx1Dyh_Y984R9LpNrpvH2D_U')");
});