Options
Styles

styles

styles is an optional property that allows you to inject plain css to the page before taking the screenshot. By default no styles are injected.

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