Image downloaded but can’t open show the format is unsupported or corrupted

This is my code:

function downloadImage(url) {
      fetch(url, {
     mode: 'no-cors',
    })
    .then(response => response.blob())
     .then(blob => {
        let blobUrl = window.URL.createObjectURL(blob);
        let a = document.createElement('a');
        a.download = url.replace(/^.*[\/]/, '');
        a.href = blobUrl;
        document.body.appendChild(a);
        a.click();
        a.remove();
        })
 }

 var url = 'https://c4.wallpaperflare.com/wallpaper/203/636/834/minimalism-landscape-digital- 
 windows-11-hd-wallpaper-preview.jpg';

 downloadImage(url)

When I run this code it’s download the image successfully but when I open the image it’s shows Sorry, Photos can’t open this file because the format is currently unsupported, or the file is corrupted Can anyone tell me please why it’s happening and how can I fix this issue.