async function displayImageAsync() { try { const response = await fetch('https://www.example.com/image.jpg'); const blob = await response.blob(); const url = URL.createObjectURL(blob); const img = document.createElement('img'); img.src = url; document.body.appendChild(img); } catch (error) { console.error(error); } }