Strapi plugin logo for QR Code Generator

QR Code Generator

This is a plugin that allows you to generate QR Codes based on specific fields or generate QR Codes with Rest API.

Strapi plugin qrcode generator logo

Strapi Plugin QR Code Generator

This is a plugin that allows you to generate QR Codes based on specific fields or generate QR Codes with Rest API.

Strapi plugin qrcode generator screenshot

Features

  • Output svg qr code with rest api parameters.
  • Adds a button to the content manager that allows users to generate a qr code.
  • Display qr code on content manager.
  • Supports collection and single types.

How to install

npm i strapi-plugin-qrcode-generator
or
yarn add strapi-plugin-qrcode-generator

Configuration

Include this to your .env file :

1
STRAPI_BASE_FRONTEND=https://www.example.org

To display the download button and qr code, you need to edit or create config/plugins.js, for each content type.

For example in the screenshot above, this is enabled :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module.exports = {
  'qrcode-generator': {
    enabled: true,
    config: {
      contentTypes: [
        {
          uid: 'api::cartel.cartel',
          targetField: 'slug',
          frontend: {
            basePath: '/cartels',
          },
        },
      ],
    },
  },
};

Here we get cartel's field slug value, then we provide basePath's value inside frontend so that the downloaded qr code from the content manager includes it.

REST API

You can also get qr codes by querying qrcode-generator endpoint :

API Reference

Endpoint

1
  GET /qrcode-generator
ParameterDescription
download=trueMake it downloadable
filename=Filename of the file
url=Url to encode

Example:

1
http://localhost:1337/qrcode-generator?url=www.example.org&filename=example-qrcode&download=true

Roadmap

  • Additional qr code configs for rest api
  • Additional params for rest api

Install now

npm install strapi-plugin-qrcode-generator

STATS

5 GitHub stars50 weekly downloads

Last updated

199 days ago

Strapi Version

Unavailable

Author

github profile image for Gaylord Julien
Gaylord Julien

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.