https://playground.jsreport.net/w/jan_blaha/HUNmlyBw
You could implement a custom helper converting url to base64 that aborts image download after some time.
const jsreport = require('jsreport-proxy')
const axios = await jsreport.npm.require('axios@0.25.0')
async function imageToDataURIWithTimeout(url) {
try {
const response = await axios.get(url, {
responseType: 'arraybuffer',
timeout: 100
})
const base64 = Buffer.from(response.data, 'binary').toString('base64')
return 'data:image/jpg;base64,' + base64
} catch (e) {
return 'some placeholder image maybe'
}
}
<img src={{imageToDataURIWithTimeout "https://jsreport.net/img/home.jpg"}} />