utopia-php / image
A simple Image manipulation library
0.8.12
2026-09-07 10:00 UTC
Requires
- php: >=8.1
- ext-gd: *
- ext-imagick: *
Requires (Dev)
None
Suggests
- ext-imagick: Imagick extension is required for Imagick adapter
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 0.8.12
- 0.8.11
- 0.8.10
- 0.8.9
- 0.8.8
- 0.8.7
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-feat/focal-point-crop
- dev-feat/semantic-focus-crop
- dev-fix/animated-webp-crop
- dev-fix/gravity-crop
- dev-fix/webp-native
- dev-fix/avif-native-imagick
- dev-memory-limits
- dev-test-packages
- dev-test-on-github-action
- dev-feat-text-overlay
- dev-feat-watermark
- dev-feat-metadata-rotation
- dev-remove-qrcode-dependency
This package is auto-updated.
Last update: 2026-09-07 10:01:47 UTC
README
Important
This repository is a read-only mirror of the utopia-php monorepo. Development happens in packages/image — please open issues and pull requests there.
Utopia Image is a lightweight PHP library for common image manipulations. It is maintained by the Appwrite team.
Getting started
Install using Composer:
composer require utopia-php/image
<?php require_once '../vendor/autoload.php'; use Utopia\Image\Image; //crop image $image = new Image(\file_get_contents('image.jpg')); $target = 'image_100x100.jpg'; $image->crop(100, 100, Image::GRAVITY_TOP_LEFT); $image->save($target, 'jpg', 100); $image = new Image(\file_get_contents('image.jpg')); $target = 'image_border.jpg'; $image->setBorder(2, "#ff0000"); //add border 2 px, red $image->setRotation(45); //rotate 45 degree $image->save($target, 'jpg', 100); $image = new Image(\file_get_contents('image.jpg')); $target = 'image_border.jpg'; $image->setOpacity(0.2); //set opacity $image->save($target, 'png', 100);
System requirements
Utopia Image requires PHP 8.1 or later. We recommend using the latest PHP version whenever possible.
Testing
composer test
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php