Skip to content

Options

hasTouch

Present the browser as a touch device.

Type
boolean
Default
false
On this page

OverviewLink to this section

Tells the page that the browser supports touch events, so sites that check for touch show their touch layout, larger tap targets or swipe galleries.

To capture the mobile version of a site, combine it with a phone sized width and height and a mobile userAgent.

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: {
        hasTouch: true
    }
})

Every option, grouped, is in the options overview.

Something unclear or missing on this page?

Tell us
Made with Modulify