constrequest=require('request-promise')constprefetch=async(element)=>{consturl=element.attr(`src`)letresponsetry{response=awaitrequest({method:`GET`,url,resolveWithFullResponse:true})}catch(err){WIKI.logger.warn(`Failed to prefetch ${url}`)WIKI.logger.warn(err)return}constcontentType=response.headers[`content-type`]constimage=Buffer.from(response.body).toString('base64')element.attr('src',`data:${contentType};base64,${image}`)