PHP Image library for generating, editing and effecting images. A component of the Pop PHP Framework

3.3.1 2019-02-22 05:43 UTC


Build Status Coverage Status Coverage Status


pop-image is a powerful and robust image processing component that's simple to use. It supports the GD, Imagick and Gmagick extensions, as well as the SVG image format. The API is Photoshop-like with calls to manipulation objects that can be extended with addition image processing functionality if needed

pop-image is a component of the Pop PHP Framework.


Install pop-image using Composer.

composer require popphp/pop-image


Resizing and saving an image

use Pop\Image\Image;

$img = Image::loadGd('image.jpg');



Using the manipulation objects

There are 6 available manipulation objects. They are:

  • Adjust
  • Draw
  • Effect
  • Filter
  • Layer
  • Type

With each of these, you can perform advanced image processing manipulation on an image. If a feature doesn't exist yet, you can extend these classes to add your own custom features.

use Pop\Image\Image;
use Pop\Image\Color\Rgb;

$img = Image::loadImagick('image.jpg');

$img->draw->setFillColor(new Rgb(255, 0, 0))
    ->rectangle(200, 200, 100, 50);

$img->effect->verticalGradient(new Rgb(255, 0, 0), new Rgb(0, 0, 255));


$img->layer->overlay('watermark.png', 200, 200);

    ->xy(50, 100)
    ->text('Hello World!');