
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
Photos are processed in memory and expire after ~15 minutes. Nothing is stored permanently on processing servers.
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 | Element | required | CSS selector or DOM element for the container |
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 (exactly 5 alphanumeric chars — anything else is ignored). When a visitor clicks through to DoVisa, an attribution cookie is set for 90 days. You earn commission when they later pay for a visa application. |
onReady | function | null | Callback when widget is fully loaded and ready |
onComplete | function | null | Callback when photo processing completes |
onError | function | null | Callback when the widget fails to load (receives an error message) |
Fair Use
Processing runs through a bounded queue — during traffic peaks the widget shows the user their place in line, and at full capacity it asks them to retry in a moment. Finished photos expire after about 15 minutes. For guaranteed capacity, 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.
}
},
onError: function(message) {
console.error('Widget error:', message);
// Handle load failures gracefully
}
});3 Data Attributes (No JavaScript Required)
<!-- Auto-initializes without any JavaScript -->
<!-- data-ref is optional: your 5-character affiliate code -->
<div data-dovisa-widget="passport-photo"
data-theme="light"
data-color="00D4AA"
data-max-width="100%"
data-ref="abc12">
</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 the "Free tool by DoVisa" link below the widget, your
refcode travels with them - An attribution cookie is set on the visitor's browser (90-day duration)
- If they later pay for a visa application, you earn commission. Document translation orders do not 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?
There is no fixed per-user quota. Processing runs through a bounded queue — during traffic peaks users see their place in line, and at full capacity the widget asks them to retry in a moment. For guaranteed capacity, contact us about enterprise plans.
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 processed in memory and automatically expire after about 15 minutes — they are not kept permanently on the processing servers. The finished photo is delivered to the email address the user enters, and nothing else is retained.
Which documents does the tool support?
The widget covers 920 official document formats across 168 countries — passports, visas, ID cards and residence permits — each rendered at the exact official size, and every photo is scored with the ISO/IEC 29794-5 biometric quality standard.
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.