QR Code feature

Generating a QR Code

This plugin offers a very simple way to generate the QR Code of a page by adding an image tag to the page.

The image tag has to look like this:

<img src="/images/qrcode/<path-to-page>"/>

where the <path-to-page> part is the path to the page without the domain and protocol parts.

We make use of the special name index (or index.html) to return the QR Code of the home page of the website you are working on.


At this time the QR Code path can be followed by two parameters to define the size of the resulting image:

scale=<1 to 5>

The scale parameter defines the size of the QR Code itself. The scale of 1 makes each point a single pixel. This is generally very tiny and will probably not work well. The default scale is set to 3 which is generally what's used on websites.

edge=<0 to 50>

The QC Code must be surrounded by enough white to be valid and readable. Without the white around, it is likely to fail.

The edge is expected to be set to the scale × 5. So the default is 15.


The settings let you defines what QR Code can be generated (only public, public and private), and the default scale and edge sizes.

The scale and edge sizes defined in the settings can always be overridden using the query string as described under Parameters.


The following would retrieve the QR Code image of the Snap! Websites home page with a scale of 3 and an edge of 15:

<img src="/images/qrcode/index?scale=3&edge=15"/>


The QR Code feature is fully working. We still want to add an interface though, in order to allow users a very easy way to add a QR Code to a page.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly