Unlimited Photo Upload System

Reusable upload component for any form - No size limits, all formats supported

Unlimited Size • All Formats • Auto-Fill
Plug & Play

Add data-upload="true" to any input field. Upload buttons auto-attach.

Auto-Fill Forms

Uploaded URLs automatically fill connected form fields. Works with any form.

No Limits

Upload photos of ANY size. Supports ALL image formats (JPG, PNG, GIF, WebP, etc.)

Live Demo

Test Upload Field
Quick Actions
Uploaded URLs:
Basic Integration - 3 Simple Steps
  1. Include the scripts
    <!-- In your HTML head -->
    <script src="upload-component/upload.js"></script>
    <script src="upload-component/embed.js"></script>
  2. Add data attribute to input fields
    <!-- Single upload -->
    <input type="text" id="profile-image" data-upload="true">

    <!-- Multiple upload (textarea) -->
    <textarea id="gallery" data-upload="true" data-upload-multiple="true"></textarea>
  3. Initialize (optional)
    <script>
    // Auto-attach upload buttons to all fields with data-upload="true"
    uploadComponentEmbed.autoAttach();

    // Or manually initialize
    uploadComponent.init({
    uploadUrl: 'upload-component/upload.php'
    });
    </script>
That's it! Upload buttons will automatically appear next to your form fields.
Advanced Configuration
// Complete initialization with all options
uploadComponent.init({
uploadUrl: 'upload-component/upload.php', // Upload handler URL
targetField: null, // Default target field ID
autoFill: true, // Enable auto-fill
multiple: true, // Allow multiple file selection
standalone: false, // Standalone mode
onUploadComplete: function(urls, files) {
// Callback after upload completes
console.log('Uploaded:', urls);
},
onAutoFill: function(url, fieldId) {
// Callback after auto-fill
console.log(`Field ${fieldId} filled with ${url}`);
}
});

// Manual usage examples
uploadComponent.setTargetField('myField').open();
uploadComponent.setMultiple(false).open();
uploadComponent.copyAllUrls();
uploadComponent.autoFill('https://example.com/image.jpg');
Data Attributes for Auto-attach:
Attribute Description Example
data-upload Enable upload for this field (set to "true") data-upload="true"
data-upload-button-text Custom button text data-upload-button-text="Upload Image"
data-upload-multiple Allow multiple files (true/false) data-upload-multiple="true"
data-upload-auto-fill Enable auto-fill (true/false) data-upload-auto-fill="true"
Usage Examples
User Registration Form
<!-- Profile picture field -->
<div class="mb-3">
<label>Profile Photo</label>
<input type="text"
id="user-avatar"
name="avatar"
data-upload="true"
data-upload-button-text="Choose Photo"
placeholder="Select a profile photo">
</div>

<!-- Cover photo field -->
<div class="mb-3">
<label>Cover Photo</label>
<input type="text"
id="user-cover"
name="cover_photo"
data-upload="true"
data-upload-multiple="false">
</div>
Product Form
<!-- Product images -->
<div class="mb-3">
<label>Main Image</label>
<input type="text"
id="product-main"
data-upload="true">
</div>

<!-- Gallery images -->
<div class="mb-3">
<label>Gallery Images</label>
<textarea
id="product-gallery"
rows="4"
data-upload="true"
data-upload-multiple="true"></textarea>
<small>Upload multiple images for product gallery</small>
</div>

Ready to Use?

Copy the entire upload-component folder to your project and start using it immediately.

Try Component

Unlimited Photo Upload System • Made with PHP, jQuery & Bootstrap • No Size Limits