Download the PHP package mynulleo/laravel-image-cropper without Composer
On this page you can find all versions of the php package mynulleo/laravel-image-cropper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mynulleo/laravel-image-cropper
More information about mynulleo/laravel-image-cropper
Files in mynulleo/laravel-image-cropper
Package laravel-image-cropper
Short Description A lightweight and reusable Laravel Blade component for cropping images with custom aspect ratio, rotation, zoom, and base64 output.
License MIT
Informations about the package laravel-image-cropper
📸 Laravel Image Cropper
A reusable Laravel Blade component for cropping images with custom aspect ratio, rotation, zoom, drag, and base64 output.
✅ Requirements
- PHP >= 8.1
- Laravel 10 or 11
- Bootstrap 5 (included in your layout or via CDN)
🔧 Installation
Install the package via Composer:
📤 Publish Assets
Run the following command to publish the required assets (CSS & JS):
Assets will be published to:
🧩 Usage
Use the component in your Blade form:
⚙ Features
- Modal-based image cropping
- Fixed or custom aspect ratio (e.g.,
816/484
) - Zoom, rotate, drag, flip, reset
- Output: base64-encoded image
- Preview support
- Responsive modal
- Automatically clears input on crop/cancel
- Built with cropperjs
📂 Asset Folder Structure
After publishing:
📦 Vite/Webpack Users (optional)
If you use a bundler and want to avoid publishing to public/
, you can import the assets directly from:
Then include them in your app.css
and app.js
builds.
📌 Notes
- Requires Bootstrap 5 (you can include from CDN or your compiled CSS)
- The
output-name
field will be the name of the hidden input that stores the base64 value - You can change modal text/button icons by editing the component view
- Image validation (mime, size, dimension) happens before cropper is shown
🧠 Backend Validation Example (optional)
🙋♂️ Support
For issues, feature requests, or contributions, please open a ticket on GitHub.
🪪 License
MIT License
© 2025 Mynul Islam (mynulleo)