
Passport Photo Widget
Add a free passport photo tool to your website in under 2 minutes. No API key required.
Quick Integration
Copy-paste code. No API keys, no complex setup. Works on any website.
Customizable
Match your brand with custom colors and light/dark themes.
Fully Responsive
Works on desktop, tablet, and mobile. Auto-adjusts height.
Privacy-First
No server storage. Photos are processed and returned directly to the user's browser.
Quick Start
Choose your platform and copy the code:
<!-- Passport Photo Widget by DoVisa -->
<div id="dovisa-photo"></div>
<script src="https://dovisa.com/assets/widgets/passport-photo.js"></script>
<script>
DoVisaWidget.init({
container: '#dovisa-photo'
});
</script>Live Preview
This is exactly what will appear on your website:
Default light theme with DoVisa brand color
Configuration Options
Customize the widget to match your needs:
| Option | Type | Default | Description |
|---|---|---|---|
container | string | required | CSS selector for the container element |
theme | string | "light" | "light" or "dark" color scheme |
primaryColor | string | "00D4AA" | Brand color in hex (without #) |
maxWidth | string | "500px" | Maximum width (e.g., "600px", "100%", "none" for full width) |
ref | string | "" | Your DoVisa affiliate code (5 alphanumeric chars). When users click through to DoVisa, an attribution cookie is set. You earn commission on any app installs (iOS/Android) or website purchases. |
onReady | function | null | Callback when widget is fully loaded and ready |
onComplete | function | null | Callback when photo processing completes |
Rate Limit
The widget is limited to 5 photo processing requests per 10 minutes per user (based on IP address). This helps prevent abuse while allowing normal usage. For higher limits, about enterprise plans.
Advanced Usage
1 Custom Colors
DoVisaWidget.init({
container: '#dovisa-photo',
theme: 'light', // or 'dark'
primaryColor: 'FF5733', // Your brand color (without #)
maxWidth: '100%' // Full width, or '600px', 'none'
});2 With Callback
DoVisaWidget.init({
container: '#dovisa-photo',
onReady: function() {
console.log('Widget loaded!');
// Hide your custom loading spinner
},
onComplete: function(success) {
if (success) {
console.log('Photo created successfully!');
// Track conversion, show message, etc.
}
}
});3 Data Attributes (No JavaScript Required)
<!-- Auto-initializes without any JavaScript -->
<div data-dovisa-widget="passport-photo"
data-theme="light"
data-color="00D4AA"
data-max-width="100%">
</div>
<script src="https://dovisa.com/assets/widgets/passport-photo.js"></script>4 Earn with Affiliate Tracking
Add your affiliate code using the ref parameter to earn commission:
- Users interact with the widget on your site
- When they click "Free tool by DoVisa" link, your
refcode is passed - An attribution cookie is set on the user's browser (90-day duration)
- If the user later installs our iOS or Android app, or makes a purchase on the website, you earn commission
DoVisaWidget.init({
container: '#dovisa-photo',
ref: 'abc12' // Your 5-character affiliate code
});Don't have an affiliate code? Join our affiliate program to get started.
Frequently Asked Questions
Is the widget free to use?
Yes, the widget is completely free. We just ask that you keep the "Powered by DoVisa" attribution link visible. Contact us for white-label enterprise options.
Does it work on WordPress?
Yes! Add the code snippet to any WordPress page using a Custom HTML block, or use your theme's code injection feature.
Can I remove the DoVisa branding?
The attribution link is required for free usage. For white-label solutions without branding, please contact us about enterprise pricing.
Is there a usage limit?
Yes, the widget is rate-limited to 5 photo processing requests per 10 minutes per user (based on IP). This prevents abuse while allowing normal usage. If you need higher limits for enterprise use, please contact us.
Does it work on mobile devices?
Yes, the widget is fully responsive and works on all devices including smartphones and tablets.
Can I customize the widget appearance?
You can customize the primary color and choose between light/dark themes. Additional customization options are available in enterprise plans.
How does the height auto-adjust work?
The widget automatically communicates its height to the parent page, so the iframe resizes smoothly as users interact with it.
Is user data secure?
Yes, we follow a privacy-first approach. Photos are never stored on our servers - they are processed in memory and returned directly to the user's browser as base64 data. Once processed, the photo exists only in the user's browser until they download or close the page. This makes the widget GDPR-friendly and highly privacy-compliant.
Platform-Specific Guides
How to add the widget on popular platforms:
WordPress
- Edit your page/post in WordPress
- Add a "Custom HTML" block
- Paste the widget code
- Save and preview
Wix
- Open Wix Editor
- Add "Embed Code" element
- Choose "Embed a widget"
- Paste the code and apply
Squarespace
- Edit your page
- Add a "Code" block
- Set display to "HTML"
- Paste code and save
Any HTML Website
- Open your HTML file
- Find where you want the widget
- Paste the code directly
- Upload and test
Need Help?
Our team is here to help you integrate the widget. Contact us for technical support or enterprise solutions.