Skip to main content

Installation

Pictum requires PHP 8.2 or newer. Install the package and a discoverable PSR-18/PSR-17 implementation such as Guzzle.

Agent skill

Install the PHP integration skill for coding agents that support Agent Skills:
Create one client and reuse it. Reading an asset’s url property makes no network request; calling svg() performs a synchronous HTTP request for canonical SVG markup.

Icons

Render SVG markup directly for HTML output, or read the asset URL when another service needs it.

Avatars

Generate portrait and generated avatar URLs with the framework-independent client. Only generated avatars provide canonical SVG markup.
The optional size requests a square raster source from 16 to 1024 pixels.

QR codes

Render canonical SVG markup directly, or select a raster format, quiet-zone behavior, and RGB or RGBA colors.

Placeholders

Render a square as canonical SVG markup, or use custom dimensions when you need another aspect ratio.

Configure the client

Pass a custom base URL to the constructor to configure every asset, or use the baseUrl named argument on one method call. You can also inject your own ClientInterface and RequestFactoryInterface implementations.
Methods also accept the exported format, variant, and gender enums instead of strings. Generated avatars default to monogram and SVG. Portrait avatars default to WebP and do not support svg().