Skip to content

Imagick Image Processor

Transform, compress, and watermark images with ease using this powerful PHP library built on the Imagick extension.

Simple & Intuitive

Clean, straightforward API that makes image processing tasks easy. No complex configuration required.

Powerful Features

Resize, compress, watermark, and adjust opacity with just a few lines of code.

Aspect Ratio Preservation

Automatically maintains image aspect ratios during resizing operations.

Flexible Watermarking

Position watermarks anywhere on your images with 9 preset positions and custom scaling.

Composer Ready

Install via Composer and start processing images immediately.

Production Ready

Battle-tested methods for real-world image processing needs.

use Kenura\Imagick\ImageProcessor;
$processor = new ImageProcessor();
// Resize an image while maintaining aspect ratio
$processor->resizeImage('input.jpg', 'output.jpg', 800, 600);
// Compress to a target file size
$processor->compressToJpg('input.jpg', 'compressed.jpg', 100); // 100KB target
// Add a watermark
$processor->addWatermark(
'input.jpg',
'watermarked.jpg',
'logo.png',
'bottom-right',
10 // 10% of diagonal
);
  • Image Resizing: Maintain aspect ratios automatically
  • Smart Compression: Compress images to target file sizes
  • Watermarking: 9 preset positions with diagonal-based scaling
  • Opacity Control: Add transparency to images
  • Combined Operations: Chain multiple operations efficiently
  • Format Support: JPEG, PNG, and GIF
  • PHP 8.1 or higher
  • ext-imagick extension version 3.7 or higher

Ready to get started? Check out the Installation Guide or dive into the Quick Start!