| name | generate-custom-qr-code |
| description | Generates a QR code from any URL, and optionally overlays a custom image in the center |
| metadata | {"author":"hatsunemiku.zo.computer","category":"Community","display-name":"Generate QR code with optional image","emoji":"📱"} |
Generate QR Code with Optional Image
Generate a QR code from a URL. Optionally overlay a custom logo/image on the center with a white background.
Parameters
url (string, required): The URL to encode in the QR code
image_path (string, optional): Path to custom image to overlay (PNG, JPG, etc.)
output_path (string, optional): Where to save the QR code. Defaults to file Images/qr_code.png
overlay_size_percent (int, optional): Overlay size as percentage of QR code (default: 25)
Usage Examples
Basic QR code (no image):
url: https://zo.computer
With custom logo:
url: https://zo.computer
image_path: /home/workspace/Images/logo.png
output_path: /home/workspace/Images/zo_qr_with_logo.png
overlay_size_percent: 25
Implementation
First, ensure dependencies are installed:
pip install qrcode[pil] pillow -q
Then generate the QR code: