Download the PHP package lamka02sk/picturium without Composer
On this page you can find all versions of the php package lamka02sk/picturium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lamka02sk/picturium
More information about lamka02sk/picturium
Files in lamka02sk/picturium
Package picturium
Short Description PHP client for the picturium image server: signed URL, srcset and
License MIT
Informations about the package picturium
picturium PHP client
A tiny, dependency-free PHP client for picturium.
Build signed media URLs and responsive <img> / <picture> markup without template clutter.
Why this library?
Your templates describe an image; picturium PHP turns that description into the
correct URL or HTML. It handles query-string encoding, URL signing, DPR
srcsets, responsive sources, and intrinsic dimensions.
It works with plain PHP, Blade, Twig, Latte, or any view layer that accepts a string. The media processing happens in the picturium server.
Install
PHP 8.4 or newer is required.
Start here
Configure the server once during application boot. Omit secret only when
signing is disabled on the server.
Then let the library render the complete, escaped image element:
Or use only the piece your template needs:
Responsive art direction
Use picture() when the image itself should change at a breakpoint. Put the
most specific source first; the browser selects the first matching source.
Each source is an independent image. Shared settings such as quality and DPR
apply to every source; media helpers include minWidth(), maxWidth(),
portrait(), landscape(), and media().
Image controls
Every picturium URL parameter has a typed setter. Use enums for fixed choices and named arguments for grouped controls:
Short aliases are available when URLs are the main concern: w(), h(),
ar(), q(), f(), g(), bg(), and more.
Good to know
- Images are immutable by default, so one configured image can safely create desktop and mobile variants.
- When both dimensions—or one dimension and an aspect ratio—are known, generated HTML includes
widthandheightto prevent layout shift. dpr([1, 2, 3])generates anx-descriptorsrcset. Use<picture>for breakpoint-specific layouts.- URLs use a stable parameter order, keeping signatures and CDN cache keys repeatable.
- Signed URLs do not expire. Rotate the server secret to invalidate them.
Need bare global helpers? Opt in once:
Development
The integration signature test is skipped unless a server is available:
The server
This package builds requests; picturium does the transformation, caching, and media delivery. See the main project for server configuration and supported formats.
License
MIT. See LICENSE.