Download the PHP package nerdcel/kirby3-responsive-images without Composer

On this page you can find all versions of the php package nerdcel/kirby3-responsive-images. 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 kirby3-responsive-images

Responsive Images Plugin

GitHub release License Kirby 4+

This plugin provides functionality to generate responsive images in your Kirby CMS projects.

Installation

  1. Using Composer:

  2. Manually: Download the latest release and copy the contents of the into your site/plugins/responsive-images folder.

Configuration

You can configure the plugin by adding the following options to your config.php file. Consider using the "ready" hook inside the kirby config if you are calling the kirby() function to set the configPath.

If you open the panel now, the plugin should have generated an empty json file with the following content:

Usage

Generating Responsive Images To generate a responsive image, use the makeResponsiveImage method:

But there is also a helper function that you can use to generate responsive images:

Focal Point

You can set the focal point(s) of an image for different viewports by adding the following fields to the image file blueprint:

AI Hint

You can mark files as AI generated and let editors display a configurable hint text overlay on top of the responsive image. Add the aihint field to the file blueprint:

Editors can enable the hint per file, override the text, choose the position (native select), font color (color picker), text size (slider, 1-15% of the image height), opacity (slider, 0-100%), the edge margin (slider, 0-3em) and the backdrop padding (slider, 0-2em) directly in the panel using Kirby's native toggle, text, select, color and range inputs. The AI hint field itself shows a live preview directly on the image that reacts instantly to every input change, and the focal points field also shows the same accurate preview on top of the real image. The backdrop box has rounded corners and its background color is chosen automatically (black or white) to contrast with the chosen font color, both in the panel preview and in the final burned-in image. Any option left untouched by the editor falls back to the blueprint defaults, which in turn fall back to the plugin's global configuration. The values are stored as plain YAML in the content file, just like Kirby's own structure/object fields (no JSON involved):

When enabled, editors get a live preview of the hint (text, position, color, size, opacity, margin and padding) directly in the panel while editing the aihint field and the focal points field. The font size scales proportionally to the rendered image height (using CSS container query block-size units) according to the editor-selected percentage (1-15%, defaulting to 5%), so it stays legible and consistently proportioned across every responsive breakpoint.

The hint is not rendered as an HTML overlay on the frontend — responsiveImage() / makeResponsiveImage() output plain <picture>/<img> markup without any extra wrapper or span. Instead, the hint is only ever conveyed on the frontend by being burned directly into the generated image itself (see below), so there is no separate stylesheet to include.

Compliance: the hint is burned into the image, not styled with CSS

A pure CSS overlay can be removed or hidden, and disappears once the image is downloaded or reused elsewhere — which isn't sufficient to satisfy AI content labelling obligations (e.g. Art. 50 of the EU AI Act). To cover this, every generated thumbnail is stamped:

Stamped copies are generated once and cached alongside the regular thumbnail; they're automatically regenerated if you change the hint text, position, color, size, opacity, margin or padding. By default, a common regular-weight system font (e.g. DejaVu Sans, Arial) is used for the burned-in text, matching the panel preview's normal font weight; you can point to your own .ttf file via the font option:

When using makeResponsiveImageObject() / responseType: 'json', the returned object includes an additional aiHint key ({ text, position, color, size, opacity, margin, padding } or null when disabled) so you can render your own overlay markup.

License This plugin is licensed under the MIT License. See the LICENSE file for more details.


All versions of kirby3-responsive-images with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.1 < 8.5
getkirby/composer-installer Version ^1.2.1
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 nerdcel/kirby3-responsive-images contains the following files

Loading the files please wait ...