Image
Image stats
- Downloads
- 106.9M
- Stars
- 13,434
- Open Issues
- 387
- Forks
- 1,521
Image handling and manipulation library with support for Laravel integration
Intervention Image
Intervention Image is a powerful PHP image handling and manipulation library designed to make it simple to create, edit, and compose images. It seamlessly integrates with Laravel, leveraging ServiceProviders and Facades to enhance functionality.
Main Features
- Ease of Use: Provides a fluent and intuitive interface for image operations.
- Integration: Fully compatible with the Laravel framework, allowing for quick setup and use within Laravel projects.
- Flexibility: Supports both GD Library and Imagick, giving developers the freedom to choose based on their project requirements.
Requirements
- PHP version 5.4 or higher.
- Fileinfo PHP extension enabled.
- GD Library (version 2.0 or higher) or Imagick PHP extension (version 6.5.7 or higher).
Installation & Basic Usage
To get started with Intervention Image, you can install the package via Composer:
composer require intervention/image
For Laravel integration and basic usage, you can follow these guides:
Here’s a quick snippet demonstrating basic operations:
$img = Image::make('public/foo.jpg'); // Open an image file$img->resize(320, 240); // Resize image$img->insert('public/watermark.png'); // Add a watermark$img->save('public/bar.jpg'); // Save the modified image
For more detailed information, refer to the official documentation.
Contributing
Contributors are welcome to enhance the capabilities of Intervention Image. Adhere to the following:
- Follow PSR-2 coding standards.
- Include tests for new features and functions.
- Ensure compatibility with both GD and Imagick drivers.
License
Licensed under the MIT License. Full details can be found in the license file.
Intervention Image continues to be a go-to choice for developers looking to handle and manipulate images efficiently in PHP and Laravel environments.