Options
Wait Before Screenshot

waitBeforeScreenshot

waitBeforeScreenshot is an optional property that sets the time to wait before taking the screenshot. By default, the time to wait before taking the screenshot is set to 0 milliseconds. The maximum value is 20000 milliseconds.

api/routes/screenshot.ts
const { UrlToImage } from '@url2image/sdk'
 
const { data, success, message } = await UrlToImage({
    url: 'URL_TO_SCREENSHOT',
    token: 'YOUR_API_KEY',
    options: {
        waitBeforeScreenshot: 1000
    }
})

The values are in milliseconds. 1000 milliseconds is equal to 1 second.