Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Simpleimage

Simpleimage Laravel Package

claviska/simpleimage

SimpleImage is a lightweight PHP 8+ GD image manipulation class. Load images from files/strings/URIs, auto-orient via EXIF, resize/crop/overlay/watermark, draw shapes/text, apply filters, and convert between GIF/JPEG/PNG/WEBP/BMP/AVIF. Chainable, exception-based.

View on GitHub
Deep Wiki
Context7

A PHP class that makes working with images and GD as simple as possible.

Frequently asked questions about Simpleimage
How do I install claviska/simpleimage in a Laravel project?
Run `composer require claviska/simpleimage` to install via Composer. Ensure PHP’s GD extension is enabled (check with `php -m | grep gd`). No Laravel-specific setup is needed beyond requiring the package.
Does claviska/simpleimage support Laravel’s Storage facade for file handling?
Yes, use Laravel’s Storage facade (e.g., `Storage::disk('public')->get('image.jpg')`) to load images from local, S3, or other storage backends. Pass the file contents to `fromString()` or save processed images via `toFile()` with a Storage path.
Can I use this package for async image processing in Laravel queues?
Absolutely. Dispatch a job (e.g., `ResizeImageJob`) with the image path, then process it in `handle()` using simpleimage. For large files, chunk processing or streaming may be needed to avoid memory limits.
What Laravel versions does claviska/simpleimage support?
The package has no hard Laravel dependencies but is tested with PHP 8.1+. Verify compatibility with your Laravel version (e.g., 10.x) by checking the [GitHub issues](https://github.com/claviska/SimpleImage/issues) for reported edge cases.
How do I handle errors like ‘GD library not installed’ in production?
Check your server’s PHP GD extension with `phpinfo()` or `php -m | grep gd`. If missing, enable it via your hosting provider (e.g., `sudo apt install php-gd` for Ubuntu) or use a fallback like Intervention Image if GD is unavailable.
Is claviska/simpleimage thread-safe for Laravel Horizon queues?
No, the library is not thread-safe by design. For multi-process environments like Horizon, ensure stateless usage (e.g., no shared resources) or implement locking (e.g., Redis) to prevent race conditions during concurrent image processing.
Can I create a Laravel facade for claviska/simpleimage to simplify usage?
Yes. Register a facade in `config/app.php` and create a `SimpleImageServiceProvider` to bind the class. Example: `SimpleImage::resize('image.jpg', 320, 200)->toFile('thumb.jpg')` for cleaner syntax.
What formats does claviska/simpleimage support for reading/writing?
The package supports GIF, JPEG, PNG, WEBP, BMP, and AVIF for both input and output. Use methods like `fromFile('image.avif')` or `toFile('output.webp', 'image/webp')` to convert between formats.
How do I add a watermark or text overlay to an image in Laravel?
Use the fluent API: `$image->fromFile('background.jpg')->overlay('watermark.png', 'center')->toFile('watermarked.jpg')` for images or `$image->drawText('Hello', 50, 50, 'red')->toFile('text.jpg')` for text with TTF fonts.
What are the alternatives to claviska/simpleimage for Laravel?
For advanced features (e.g., SVG, PDF, or AI filters), consider [Intervention Image](https://image.intervention.io/) (GD/Imagick) or [Laravel Image](https://spatie.be/docs/laravel-image). For microservices, self-host [Imagick](https://php.net/manual/en/book.imagick.php) or use cloud APIs like AWS ImageOptim.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky