Advanced Features
FreshShots offers advanced features for users who need more control over their screenshot automation workflows.
Device and Browser Options
FreshShots supports multiple browsers and device emulations using Playwright:
Supported Browsers
- Chromium: Best compatibility with modern web apps (default)
- Firefox: Alternative rendering engine for cross-browser testing
- WebKit: Safari-based rendering for iOS-like screenshots
Device Emulation
Choose from Playwright’s built-in device profiles including:
- Desktop: Various screen resolutions and browser configurations
- Mobile: iPhone, Android device emulation with touch events
- Tablet: iPad and Android tablet screen sizes
You can also set custom viewport dimensions using the viewport_size
parameter in your workflow steps.
Advanced Screenshot Options
Image Processing
Fine-tune your screenshot capture with these options:
- Zoom Factor: Scale screenshots up to 3x using the
image_zoom
parameter
- Padding: Add consistent spacing around captured elements with the
padding
parameter
- Element Clipping: Capture precise element boundaries using
data-freshshots-id
selectors
- Full Page: Capture entire page height by omitting the
selector
parameter
Example with Advanced Options
{
"action": "take_screenshot",
"selector": "main-content",
"save_screenshot_to": "content.png",
"viewport_size": { "width": 1280, "height": 720 },
"image_zoom": 1.5,
"padding": 20
}
Error Handling & Reliability
Fault Tolerance
Configure steps to handle errors gracefully:
{
"action": "click_element",
"selector": "optional-button",
"skip_if_error": true
}
When skip_if_error
is true
(default), the workflow continues even if the step fails.
Timeout Configuration
Set custom timeouts for slow-loading pages or elements:
{
"action": "visit_page",
"url": "https://slow-loading-site.com",
"execution_timeout": 15000
}
Automatic Retry Logic
- Failed jobs are automatically retried up to 3 times
- Uses exponential backoff to prevent overwhelming target servers
- Detailed error logs help debug workflow issues
Batch Screenshot Operations
Capture multiple screenshots in a single workflow execution:
[
{
"action": "visit_page",
"url": "https://example.com"
},
{
"action": "take_screenshot",
"selector": "header",
"save_screenshot_to": "header.png"
},
{
"action": "scroll_to",
"selector": "main-content"
},
{
"action": "take_screenshot",
"selector": "main-content",
"save_screenshot_to": "content.png"
},
{
"action": "take_screenshot",
"selector": "footer",
"save_screenshot_to": "footer.png"
}
]
This workflow captures three different sections of the same page in one execution.
Concurrent Processing
- Multiple workflows can run simultaneously
- Queue system with concurrency control prevents resource conflicts
- Intelligent job scheduling optimizes processing times
Browser Session Efficiency
- Browser contexts are reused within workflows for faster execution
- Page assets are cached between steps when possible
- Optimized image processing pipeline for fast screenshot generation
Security Features
Private Screenshot Storage
- All screenshots are private by default
- User-specific file organization prevents data leakage
- Secure CDN delivery with controlled access
Safe Browsing Environment
- Sandboxed browser environments protect against malicious websites
- Automatic cleanup of sensitive data after workflow completion
- Isolated execution prevents cross-user contamination
API Integration
Webhook Notifications
Receive real-time notifications when workflows complete:
{
"webhook_url": "https://your-app.com/webhook"
}
FreshShots will POST the results to your endpoint with detailed job information.
Programmatic Access
- RESTful API with API key authentication
- Trigger workflows from CI/CD pipelines
- Monitor job status and retrieve results programmatically
Usage Analytics
Basic Metrics
Track your FreshShots usage through the dashboard:
- Screenshot count per billing period
- Success/failure rates for workflows
- Processing time statistics
- Active workflow monitoring
Billing Integration
- Real-time usage tracking against plan limits
- Automatic notifications when approaching limits
- Easy plan upgrades for increased capacity
Best Practices
Workflow Design
- Start workflows with a
visit_page
step
- Use descriptive filenames for
save_screenshot_to
parameters
- Test workflows with the manual run feature before automating
- Set appropriate timeouts for slow-loading content
Element Targeting
- Use unique
data-freshshots-id
values for reliable element selection
- Avoid generic selectors that might match multiple elements
- Test element selectors in your browser’s developer tools
Error Handling
- Use
skip_if_error: true
for optional interactions
- Set reasonable timeout values based on expected page load times
- Monitor error logs to identify and fix workflow issues
- Combine related screenshots into single workflows when possible
- Use appropriate viewport sizes for your use case
- Consider using webhooks instead of polling for job completion
Limitations
Current Restrictions
- Screenshot format: PNG only
- Image compression: Not configurable
- Custom HTTP headers: Not supported in workflows
- Cookie/session handling: Limited to what the automated browser can access
Browser Behavior
- Some websites may detect and block automated browsers
- JavaScript-heavy sites may require additional wait times
- Single-page applications may need specific navigation handling
Getting Help
For questions about advanced features or workflow optimization:
Include specific workflow JSON and error messages when requesting support for the fastest resolution.