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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package picturium

picturium

picturium PHP client

A tiny, dependency-free PHP client for picturium.
Build signed media URLs and responsive <img> / <picture> markup without template clutter.

PHP 8.4 or newer Zero runtime dependencies

picturium.cc · PHP client docs · picturium server

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 or any view layer that accepts a string, and ships optional bridges for Laravel and Symfony. The media processing happens in the picturium server.

Features

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.

Laravel

The package ships an optional Laravel bridge. Nothing extra to install: it is auto-discovered when Laravel is present and inert when it is not.

config/picturium.php also takes defaults applied to every image, named presets, and additional connections. Keys are DSL setters in kebab-case — the same vocabulary everywhere:

A sources key makes a <picture> preset: each entry is a source, in the same vocabulary as the sources prop. Sources passed inline replace the preset's. Such a preset only works on a picture; an img or cast using it throws.

Blade

Every setter is a prop, including the short aliases. Anything the DSL does not own — class, loading, data-* — lands on the tag:

An inline prop overrides its preset. on="cdn" picks another configured server. Grouped controls take an array, spread as named arguments:

One name to watch: style is an image parameter — CSS for SVG rendering, which the library base64-encodes for you. Inline CSS for the tag goes through :tag-attributes:

Eloquent

Cast a column holding a source path, so image treatment is declared once on the model rather than in every controller. The arguments are a preset name and, optionally, a connection:

$product->hero is now an Image. The column still stores the path, and assigning an Image back stores its source rather than its URL.

Inertia

Image and Picture are JsonSerializable, so with the cast above a page needs no per-image work in the controller:

The prop arrives as an attribute object you spread onto an element:

A Picture serializes to { sources, img }:

Symfony

The package also ships a Symfony bundle. Register it:

It takes the same keys as the Laravel config file. An empty secret means signing is off. Picturium autowires to the default server, each server is also a picturium.connection.<name> service, and img() / picture() resolve through the container.

Twig

With Twig installed, the bundle registers two functions. Props use the Blade vocabulary: DSL setters become parameters (kebab-case or camelCase), anything else lands on the tag:

As in Blade, style is the SVG image parameter. Inline CSS for the tag goes through attributes: {style: 'aspect-ratio:16/9'}.

Doctrine

With DBAL installed, the bundle registers a picturium_image column type, plus picturium_image.<preset> for each preset. The column stores the source path and hydrates to an Image:

Assigning an Image back stores its source rather than its URL. Unlike the Eloquent cast, the type cannot pick another server: Doctrine types never see per-column options.

Good to know

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.

AI disclosure

This library was written mainly by AI agents and reviewed by a human.


All versions of picturium with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lamka02sk/picturium contains the following files

Loading the files please wait ...