You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description
Looks like the current browser viewport is 1920px, which isn't ideal in all scenarios where you need to take a screenshot. I generally take most screenshot, if any, at 1440px. Though would love a way to change the viewport size here.
Proposed Feature
Add a way to specify width/height.
Alternatives Considered
I currently have a workaround, but it won't fit all use cases.
Currently for /scrape, I take a full page screenshot which is currently 1920px, but most sites I intend to visit fit under 1440px width and generally looks better in the screenshot.
My workaround right now is:
Add a JS steps in /scrape endpoint with the code: window.document.documentElement.style.setProperty('width', '1440px');
This resizes the window and sticks the screenshot to left, leaving extra space on the right, though viewport remains the same
Then using Cloudflare image transformation, I'm trimming the image on the right by 480px
This trims the images nicely but is prone to error if future needs change + can't use transformation in each case
Implementation Suggestions
An argument to specify viewport width in either actions, or request body. Maybe introduce a new optional browserOptions parameter which can take several browser level customizations?!
Use Case
Taking a screenshot is already very handy while scraping, allowing to customize the viewport size would make it further useful in several contexts e.g. testing responsiveness, preparing consistent reports with fixed screenshot size etc.
The text was updated successfully, but these errors were encountered:
Problem Description
Looks like the current browser viewport is 1920px, which isn't ideal in all scenarios where you need to take a screenshot. I generally take most screenshot, if any, at 1440px. Though would love a way to change the viewport size here.
Proposed Feature
Add a way to specify width/height.
Alternatives Considered
I currently have a workaround, but it won't fit all use cases.
Currently for
/scrape
, I take a full page screenshot which is currently 1920px, but most sites I intend to visit fit under 1440px width and generally looks better in the screenshot.My workaround right now is:
/scrape
endpoint with the code:window.document.documentElement.style.setProperty('width', '1440px');
Implementation Suggestions
An argument to specify viewport width in either actions, or request body. Maybe introduce a new optional
browserOptions
parameter which can take several browser level customizations?!Use Case
Taking a screenshot is already very handy while scraping, allowing to customize the viewport size would make it further useful in several contexts e.g. testing responsiveness, preparing consistent reports with fixed screenshot size etc.
The text was updated successfully, but these errors were encountered: