Logo upload functionality
The application provides a simple file upload interface for adding logos:Upload interface
The logo upload section includes both upload and remove functionality:The remove button (trash icon) only appears when a logo is currently loaded, providing a clean interface.
Logo size and positioning
Logos are automatically sized and centered within the QR code:Logo dimensions
Size: 22% of the total QR code size
Width and height: Equal (square aspect ratio)
For 280px QR: Logo is approximately 62px × 62px
Width and height: Equal (square aspect ratio)
For 280px QR: Logo is approximately 62px × 62px
Positioning
Horizontal: Centered (x: undefined)
Vertical: Centered (y: undefined)
Automatic: No manual positioning needed
Vertical: Centered (y: undefined)
Automatic: No manual positioning needed
Excavate feature
Theexcavate: true setting is critical for logo integration:
What excavate does
What excavate does
The excavate feature removes the QR code pattern behind the logo, creating a clean space. This prevents the QR pattern from showing through or interfering with the logo image.
Why it's important
Why it's important
Without excavation, the QR code modules would overlap with the logo, creating visual noise and potentially affecting scannability. Excavation ensures a professional appearance.
Technical implementation
Technical implementation
The qrcode.react library handles excavation automatically when
excavate: true is set, calculating which modules to remove based on the logo position and size.Error correction level enforcement
When a logo is present, the error correction level is automatically set to ‘H’ (maximum):Why level ‘H’ is required
Data redundancy
Error correction level ‘H’ provides 30% redundancy, allowing up to 30% of the QR code to be damaged or obscured
Logo coverage
The 22% logo size fits within the 30% tolerance, ensuring the QR code remains scannable
Automatic enforcement
The application automatically switches to level ‘H’ when you add a logo, regardless of your quality setting
Supported image formats
The file input accepts all image formats:- PNG - Best for logos with transparency
- JPEG/JPG - Good for photographic logos
- SVG - Vector logos (converted to raster in QR code)
- GIF - Supported, but static frame only
- WebP - Modern format with good compression
Logos with transparent backgrounds work best, allowing the QR code background color to show through.
High-resolution export
Logos are included in both PNG and SVG exports:PNG export (2× resolution)
SVG export (vector format)
The SVG export embeds the logo as an image element within the vector graphic, maintaining the 22% size ratio.Logo best practices
Simple designs
Use logos with clear, simple designs that remain recognizable at small sizes
High contrast
Ensure your logo has good contrast with the QR code background
Square aspect ratio
Square or nearly-square logos work best in the circular center space
Test scanning
Always test QR codes with logos on multiple devices before production use