Fetch image from wix url

Hi, I’m trying to fetch an image from a converted wix url (wix:data → https://…). Unfortunately, I can’t seem to find a way to fetch to buffer. I need to resize it before sending it to an api (and by default, the images are too large).

I tried to fetch but got the following:
import fetch from ‘node-fetch’ ;
let memoryImage = await fetch ( url ). then (( response ) => {
return response
})

I also tried with the Request library (very old and outdated), but got some generic “Error: error”

I saw that there is a “Wix-Fetch”, but I can’t seem to access the data.

Any help would be appreciated,
Thank you

https://www.wix.com/velo/reference/wix-fetch/fetch

As mentioned above, I’ve tried with Wix-Fetch, but it won’t give me the buffer, like the standard Fetch library would:

let body = await fetch ( url , { “method” : “get” })
. then (( httpResponse ) => {
if ( httpResponse.ok ) {
return httpResponse
} else {
return Promise . reject ( “Fetch did not succeed” );
}
})
. catch ( err => console . log ( ‘fetch’ , err ));

The response of this gives:

Normally, with Fetch, you’d use arrayBuffer(), but it doesn’t exist on this one. I also tried to use the .text() or json(), no data there.

I am having the same problem, the Data that i can store in the variables from a https request is on json() or string() there is no byte type that i can use for example for fetching a img or a doc file. There is someway to do this inside Wix i am thinking of using third party server to do it instead.