utopia-php/image
A simple Image manipulation library
Maintainers
0.8.6
2026-04-19 12:52 UTC
Requires
- php: >=8.1
- ext-gd: *
- ext-imagick: *
Requires (Dev)
- laravel/pint: 1.24.*
- phpstan/phpstan: 2.1.*
- phpunit/phpunit: 10.5.*
Suggests
- ext-imagick: Imagick extension is required for Imagick adapter
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-05-19 13:00:42 UTC
README
👁 Build Status
👁 Total Downloads
👁 Discord
Utopia Image library isLite & fast micro PHP library for creating common image manipulations that is easy to use. This library 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_NORTHWEST); $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.0 or later. We recommend using the latest PHP version whenever possible.
Copyright and license
The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
