search

QRCode Plugin for Typemill

Generate QR Codes in your content using simple shortcodes. Powered by endroid/qr-code.

Usage

Use the shortcode [:qrcode ...:] in your content. No core modifications required.

Basic Example

[:qrcode data="https://typemill.net":]

Advanced Example

[:qrcode data="https://typemill.net" size="400" margin="20" color="#FF0000" background="#FFFFFF" label="Scan me" logo="media/files/logo.png":]

Alignment Example (Right)

[:qrcode data="https://typemill.net" alignment="right" label="Scan me":]

Options

These options can be set globally in the Plugin Settings or overridden in the shortcode.

Option Shortcode Attribute Default Description
Data data (required) The text or URL to encode.
Size size 300 Size of the image in pixels.
Margin margin 10 Margin around the QR code in pixels.
Color color #000000 Foreground color (Hex).
Background background #ffffff Background color (Hex).
Logo logo (empty) Path to a logo image (e.g. media/files/logo.png).
Logo Width logo_width (empty) Force a specific width for the logo in pixels.
Label label (empty) Text label displayed below the QR Code.
Alignment alignment left Position of the QR Code: left, center, right.

How It Works

The plugin hooks into Typemill's native onShortcodeFound event. Generated QR code images are written to /cache/generated/qrcode/ as static PNG files (keyed by a SHA1 hash of all parameters) and served via a normal public URL. Identical shortcodes are served from cache without regenerating the image.

Version History


© 2026 by M. Klein