JSFiddle - React, Tailwind, and code Playground

by MasterAlex

JavaScript

var loadImage = () => {
  const image = new Image()
  return new Promise((resolve) => {
      image.onload = resolve
      image.src="https://s3api-dev.medzdrav.ru/default/user/11150/chat/321/d4e8a4e216b5ca7e3c93149d23db92f7/2020-06-12%2017.11.55.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=vtbmed%2F20200808%2Feurope%2Fs3%2Faws4_request&X-Amz-Date=20200808T190319Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Signature=ca10881947e1d5aadefd57b9c97f694ee74db687faf1587566f333c6d498c58a"
  })
}

loadImage().then(result => console.log(result.path[0]))