Download the PHP package nlk/image-editor without Composer
On this page you can find all versions of the php package nlk/image-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nlk/image-editor
More information about nlk/image-editor
Files in nlk/image-editor
Package image-editor
Short Description A Laravel package for an advanced image editor.
License MIT
Informations about the package image-editor
NLK Image Editor
A powerful, customizable, and easy-to-integrate Image Editor package for Laravel. Provide your users with professional image editing capabilities directly within your application UI, without relying on external tabs or heavy desktop software.
🚀 Features
- Full Canvas Control: Move, scale, and rotate the main image and any added objects freely.
- Background Operations: Support for changing canvas background to transparent, solid colors, stunning gradients, or uploaded images.
- Crop Tool: Interactive visual cropping.
- Drawing & Eraser: Freehand drawing with adjustable brush size and colors.
- Text & Typography: Add rich text with custom typography (font family, size, colors, bold, italic).
- Shapes & Stickers: Insert rectangles, circles, triangles, arrows, and a rich library of pre-defined emojis/stickers.
- Image Filters: Apply various photo filters like Grayscale, Sepia, Vintage, Invert, along with sliders for Brightness, Contrast, Saturation, and Blur.
- AI Integration Ready: Built-in UI controls and loading states for AI background removal and image upscaling (AI processing logic must be provided by the host application's backend).
- History Management: Comprehensive Undo and Redo functionality.
- Localization: Out-of-the-box support for English, Arabic, and Turkish. Fully customizable via Laravel's translation system.
📦 Installation
This package is designed to be easily plugged into any Laravel 8+ project.
Require the package via Composer:
Publishing Assets
The package contains Blade components, Javascript files, and Translations. Publish them into your application using:
Note: Don't forget to push the scripts stack in your main layout to render the package's javascript files correctly. The package pushes scripts to the
@push('js')stack.
🧑💻 Usage
1. Render the Editor Component
Place the component tag anywhere in your blade view. This renders the hidden editor modal structure.
2. Configure JavaScript Environment
The editor relies on a global variable for identifying where to route AI processing requests (if you use them). Make sure you define it before the scripts are loaded:
3. Initialize the Widget (HTML Elements)
The package provides a helper NLKImageWidget.initWidget() to easily bind the editor to standard file inputs.
Blade HTML example:
JavaScript Initialization:
4. Opening the Editor Manually (API)
If you have a custom UI flow, you can invoke the editor manually by passing a Base64 string payload:
🧠 AI Endpoint Structure
If you wish to use the AI Background Remover and AI Upscaler UI buttons, your Laravel route (window.processImageUrl) should accept a POST request with the following JSON payload:
And it must return a JSON response containing the processed base64 image:
🌐 Translations
Translations are located in resources/lang/vendor/nlk/ after running vendor:publish. You can modify the translated strings for en, ar, and tr directly in your host application without altering the core package.
🛡️ License
This package is open-source software built for NLKMenu frameworks.