Developer workspace with code editor showing widget integration
Developer Tools

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:

OptionTypeDefaultDescription
containerstring | ElementrequiredCSS selector or DOM element for the container
themestring"light""light" or "dark" color scheme
primaryColorstring"00D4AA"Brand color in hex (without #)
maxWidthstring"500px"Maximum width (e.g., "600px", "100%", "none" for full width)
refstring""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.
onReadyfunctionnullCallback when widget is fully loaded and ready
onCompletefunctionnullCallback when photo processing completes
onErrorfunctionnullCallback 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:

  1. Users interact with the widget on your site
  2. When they click the "Free tool by DoVisa" link below the widget, your ref code travels with them
  3. An attribution cookie is set on the visitor's browser (90-day duration)
  4. 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

  1. Edit your page/post in WordPress
  2. Add a "Custom HTML" block
  3. Paste the widget code
  4. Save and preview

Wix

  1. Open Wix Editor
  2. Add "Embed Code" element
  3. Choose "Embed a widget"
  4. Paste the code and apply

Squarespace

  1. Edit your page
  2. Add a "Code" block
  3. Set display to "HTML"
  4. Paste code and save

Any HTML Website

  1. Open your HTML file
  2. Find where you want the widget
  3. Paste the code directly
  4. Upload and test

Need Help?

Our team is here to help you integrate the widget. Contact us for technical support or enterprise solutions.

Try Full Version