Skip to content

Options

allowAnimations

Set it to false to freeze CSS animations and transitions during the capture.

Type
boolean
Default
true
Group
Timing
On this page

OverviewLink to this section

With false, CSS animations and transitions are stopped for the capture: those that end jump to their final state, and those that loop forever go back to their first frame. The image never catches an element halfway through a fade or a slide.

Animations driven by JavaScript or video are not affected. For those, give them time with waitBeforeScreenshot or hide them with styles.

ExampleLink to this section

The same request with the SDK, with cURL and as the raw JSON body.

screenshot.ts
import { Url2Image } from '@url2image/sdk'

const { success, data, message } = await Url2Image({
    url: 'https://example.com',
    token: process.env.URL2IMAGE_TOKEN,
    options: {
        allowAnimations: false
    }
})

Every option, grouped, is in the options overview.

Something unclear or missing on this page?

Tell us