Issue Feature Closed

#111258Expose generic QR code rendering through a public API and Fluid ViewHelper

David R. 10/27/26, 17:52 updated 10/27/26, 20:59

Description

Thank you for adding QR code generation to the Core.
Could the existing functionality also be made available through a public rendering service and a Fluid ViewHelper?

Use case and benefit

QR codes can contain contact details, Wi-Fi configuration, identifiers or plain text. These use cases do not require a managed URL or a redirect record.

For example, a template could generate a contact QR code from existing contact data or an inventory label from a record identifier. A Core ViewHelper would let integrators render these directly from template variables, using the existing QR encoding capability.

Currently, the SVG rendering method is private within the internal QrCodeController

sysext/backend/Classes/Controller/QrCodeController.php

Integrators therefore need their own adapter to use this functionality in Fluid.

Proposed scope

  • Expose a supported QR rendering service using the existing BaconQrCode dependency.
  • Provide a Fluid ViewHelper accepting a string payload and rendering options, initially with SVG output.
  • Allow use without a backend session, redirect record or Link Management configuration.
  • Keep rendering free of implicit record creation. Formatting structured payloads remains the caller’s responsibility.

Illustrative Fluid syntax:

<f:qrCode content="{payload}" size="256" />

The existing backend components, Fluid ViewHelper and PHP callers could share the same rendering service. This would make the capability available across TYPO3 while keeping encoding and rendering behaviour consistent.

Related work

- #108001: Add QR Code component > introduced the reusable backend component.
- #107756: QR Code Generator into Redirects > introduced the managed redirect use case.
- #108854: Event to modify generated QR code > proposes rendering customisation. -> This request complements that work by making QR generation accessible from PHP and Fluid, independently of the backend.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 1

  1. Oliver Bartsch commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-27T20:59:16+00:00" > 10/27/26, 20:59 </span>

    Hey,

    thanks for the detailed proposal. We are not going to add this to Core, so I’m rejecting the issue.

    QR code rendering in Core is an implementation detail of a few backend features: the MFA/TOTP setup, preview QR codes and the QR code module in EXT:redirects. bacon/bacon-qr-code is an internal dependency of typo3/cms-core. A public rendering service with options, or a Fluid ViewHelper, would make that library and its option set part of the Core API. Replacing or updating the library would then be a breaking change for every installation using the ViewHelper, or would need a deprecation and migration path. That cost is not justified for something Core itself does not need in the frontend.

    This fits well in an extension, and the effort is small. Require bacon/bacon-qr-code in your extension’s composer.json and render the SVG yourself:

    $renderer = new \BaconQrCode\Renderer\ImageRenderer(
        new \BaconQrCode\Renderer\RendererStyle\RendererStyle(256, 2),
        new \BaconQrCode\Renderer\Image\SvgImageBackEnd()
    );
    $svg = (new \BaconQrCode\Writer($renderer))->writeString($payload);

    Wrap that in a ViewHelper and you control the options (error correction, colours, PNG output, vCard/Wi-Fi formatting). Existing extensions already do this, e.g. traw/vcfqr.

    Cheers, Oli