type
Type: <string>
Default: 'png'
Values:
Default: 'png'
Values:
'jpeg' | 'png'
It specifies the screenshot file type for the screenshot over the target url.
- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://microlink.io', { screenshot: {type: 'jpeg'} })
mql.render(data)
This query parameter just defines the file format to be used at asset generation.
When you consume the asset thought Microlink CDN, it automatically optimizes the assets to serve the best format possible (like WebP) based on your device (it's determining via
user-agent
header).