I am confused by strange behavior of fetch on mobile devices, ios or android - doesn't matter. My goal is to load an image by its url via fetch and then represent the loaded data (a jpeg image, for example) as binary data (Blob). The image does really exist, I can open the url, no problem here. My code just repeats examples from well-known tutorials:
const response = await fetch('https://image-url');
const blob = await response.blob(); // here appears the problem apparently
new File([blob], 'image name', { type: blob.type });
But what happens is that this code throws an error on mobile devices (only there, desktop browsers are fine) like TypeError: failed to fetch at the moment when I try to treat loaded image as binary data - await response.blob(). Request's Accept header is */*. The response comes back as image/jpeg. No CORS issues, the image's server has set Access-Control-Allow-Origin: *. What am I doing wrong?