Download the PHP package volkmann-design-code/kirby-upload-images without Composer

On this page you can find all versions of the php package volkmann-design-code/kirby-upload-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 kirby-upload-images

Kirby Upload Images

Kirby 5.1+ and 6 (tested with 5.5.2, 5.6.1, 6.0.0-alpha.3) · PHP 8.2–8.5 · MIT

Uploaded images, made web-ready right after Kirby stores them:

It works on Kirby's own upload, so in every files section and files field of the Panel, for File::create() and $file->replace(), for the file templates you turn it on for.

Why

Kirby can resize images on upload (create: width/height in a file blueprint), and that covers many sites. It runs into three things that phones bring along:

This plugin uses Imagick when the server has it: ImageMagick works outside PHP's memory_limit, so photos of any size fit, and it decodes HEIC if built with libheif (many hosts are). Without Imagick, or when its ImageMagick lacks a format involved (some builds can't read JPEG), it uses Kirby's GD driver after checking that the image fits into the memory PHP has left, and refuses it with a clear message before anything is stored otherwise.

Similar concepts and plugins

Install

Composer

Git submodule

Download

Download the latest release and unzip it into site/plugins/upload-images.

Usage

Turn it on in the file blueprints it should work for, and accept HEIC there: Kirby's image type includes it (accept: image on its own would be a MIME type, which image/heic doesn't match):

Upload a photo: it is stored as a JPEG of at most 2560 px with its capture time and camera in the fields taken and camera. The fields don't have to be in the blueprint; showing them is up to you.

A blueprint can bring its own options:

Or turn it on for every image upload (enabled: true below).

Options

A blueprint's uploadImages options override these for its files. More formats: e.g. 'convert' => ['heic' => 'jpg', 'heif' => 'jpg', 'png' => 'webp'] (transparency becomes white when converting to JPEG). GIFs are left alone (animations), SVGs too.

Metadata

Keys for fields, each written only when the photo has it:

Key Example
taken 2026-10-05 09:12:00 (as Kirby's date field stores it)
lat, lng 51.31295, 9.480119
location 51.31295, 9.480119
altitude 153.2 (metres)
camera Apple iPhone 15 Pro
lens iPhone 15 Pro back triple camera 6.86mm f/1.78
iso, aperture, exposure, focalLength 64, f/1.8, 1/120 s, 6.9 mm
width, height the original's, as shown
filename the name it was uploaded with

GPS is not written by default. Where a photo was taken can be personal data (and dangerous to publish for some people); map lat, lng or location to fields only where you need them, and keep in mind that file fields can show up wherever your templates output them.

Without Kirby's upload

The conversion is also a function, e.g. for your own upload route before File::create():

Server

Imagick GD only
JPEG, PNG, WebP, AVIF any size what fits into PHP's free memory (≈ 12 MP at 128 MB)
HEIC/HEIF if ImageMagick has libheif refused
Colour profile kept dropped

Check your server with its PHP:

PHP's exif extension reads JPEG metadata; HEIC metadata comes through Imagick.

Measured with ImageMagick 6.9.11 and PHP's memory_limit at 128 MB: a 12 MP iPhone photo (HEIC, 840 KB) became a 2560 × 1920 JPEG of 425 KB in 0.4 s; a 48 MP JPEG (14 MB) and a 24 MP HEIC each one of about 630 KB in 1.5 s; PHP itself stayed at 12–16 MB.

Notes

How it works

Languages

Error messages in English and German, English elsewhere. More languages are welcome as a pull request (index.php).

Development

A pre-push hook refuses a tag that doesn't match version in composer.json at its commit; Packagist would ignore it.

Without Imagick the Imagick tests skip; CI installs it. The cover images .github/cover.png (2:1) and .github/cover-square.png (1:1) are rendered from a real Panel: the iPhone photo below, uploaded through this plugin, the same on every run (pinned Chromium and fonts). Converting HEIC takes Imagick with libheif; without it locally, the script runs PHP in the Docker image above (built when missing):

tests/fixtures/iphone.heic is a real iPhone 14 Pro photo by Enzo Volkmann, published with this repository under its licence, metadata and location kept on purpose; the other fixtures are generated. To run them locally with Docker:

License

MIT, see volkmann design code.


All versions of kirby-upload-images with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
getkirby/composer-installer Version ^1.2
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 volkmann-design-code/kirby-upload-images contains the following files

Loading the files please wait ...