Awesome Open Source
Awesome Open Source


Build Status Latest Stable Version Latest Unstable Version Total Downloads License

A PHP library for easy image handling. 🖼

A simple presentation card with GImage

Presentation card built with GImage - View code example


GImage is a simple and small library based on PHP Image Processing and GD for processing images without stress.

  • Load an image from local path, URL or image resource.
  • Create shapes such as rectangles or ellipses with opacity.
  • Resize, scale or crop images proportionally.
  • Rotate images, shapes or texts.
  • Embed text with custom TTF fonts.
  • Compose a pool of images with Canvas.
  • Swap image formats such as JPEG, PNG or GIF.
  • Save images in local or output on the browser.
  • Save several copies of the same image.
  • Render an image in-memory and return the resource.


GImage requires PHP 7.x and latest GD Extension.


composer require joseluisq/gimage


Load an external PNG image and save it as JPG:


use GImage\Image;

// PNG image (600x199)
$url = '';

$arch = new Image();
    // Load from URL
    // Scale to 50% (300x99)
    // Change the format to JPG
    // Saving in local path

See GImage Website for detailed usage instructions and code examples.


Check out the file.


If you would like to contribute pull requests and issues will be welcome! Feature requests are welcome. Please before sending some feature requests make sure provide as much detail and context as possible.


MIT license

©2015-present José Quintana

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
php (16,727
image (508
rendering (175
png (103
php-library (93
crop (81
scale (71
resize (51
shapes (20
jpg (19
gd (17