Setting width to 390 gets the media queries right, but the page still sees a desktop browser: no touch, a desktop user agent and a density of 1. Sites that serve different markup or images to phones show their desktop version squeezed into a narrow window.
Use the mobile preset
device: "mobile" sets a 390 by 844 viewport, a device pixel ratio of 3, touch and a phone user agent together. An explicit width, height or device_scale_factor still wins, which is how the request below keeps the phone layout at a density of 2.
curl -sS https://api.ironfang.com/render/v1/screenshot \
-H "Authorization: Bearer $IRONFANG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://ironfang.com/company",
"device": "mobile",
"device_scale_factor": 2,
"full_page": true,
"full_page_readiness": "scroll",
"format": "jpeg",
"quality": 80
}' \
-o company-mobile.jpg
- company-mobile-full.jpg: the whole capture, as the request above returned it on 13 October 2026
Keep the output a usable size
The image is the page height times the density. At the preset density of 3, a page 19,070 CSS pixels tall comes back 57,210 pixels tall, which many image viewers and upload limits refuse. For archives and review, a density of 1 or 2 is usually enough.
WebP cannot hold an image taller than 16,383 pixels, so use JPEG or PNG for long captures. JPEG keeps a tall capture small; PNG is lossless.
Cap pages with no natural end
A feed that keeps loading has no bottom. full_page_max_height cuts the capture at a height in CSS pixels, 20,000 at most and by default, and the X-Ironfang-Warnings header says height_capped when it does.
{
"url": "https://example.com/feed",
"device": "mobile",
"full_page": true,
"full_page_max_height": 8000,
"format": "jpeg"
}Sticky headers and fixed bars
The capture is taken from the top, so a sticky header appears once, at the top, and a fixed bar sits where it was in the first screen. Hide either with hide_selectors, and consent banners with block_cookie_banners.
Next
- Full page screenshot API: what a full-page capture does and what it costs
- Screenshot request reference: device, full_page_max_height and the output formats
- Capture lazy-loaded content in a full-page screenshot
- Capture screenshots without ads or cookie banners
- Full API reference

