Adding imagebefore the “contains” using javascript

Need help on this code below. I don’t want to replace the text on which I called in my “a:contains”. The problem is where do I need to put the ::before on the script below.

Link: https://jsfiddle.net/onw7aqem/

<a href="#">This is the text</a>

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document)$(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')");
});
</script> ``