<img src="https://res.cloudinary.com/dvhhqcxre/image/upload/v1611495185/zenith/tldyffcvvfm9fj51pvjp.jpg">
I want to get rid of the img tag, I just want only the image link
const image = document.querySelector('img')
image.outerHTML = image.src
<img src="https://res.cloudinary.com/dvhhqcxre/image/upload/v1611495185/zenith/tldyffcvvfm9fj51pvjp.jpg">
You can use a DOMParser to parse the string and get the src property of the image:
const str = `<img src="https://res.cloudinary.com/dvhhqcxre/image/upload/v1611495185/zenith/tldyffcvvfm9fj51pvjp.jpg">`;
const res = new DOMParser().parseFromString(str, "text/html").querySelector('img').src;
console.log(res)