JSFiddle - React, Tailwind, and code Playground

HTML

<img src="http://example.com/image.jpeg" alt="http://example.com/image.jpeg" />

JavaScript

$('img').attr({
    src: "http://example.com/another.jpeg",
    alt: "http://example.com/another.jpeg"
});