Download the PHP package nijwel/image-upload without Composer
On this page you can find all versions of the php package nijwel/image-upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package image-upload
nijwel/image-upload
A simple and flexible PHP package for handling image uploads, resizing, and management.
Features
- Upload images with support for multiple formats (JPEG, PNG, GIF, WEBP).
- Resize images while maintaining aspect ratio.
- Save images with dynamic filenames and custom paths.
Installation
You can install the nijwel/image-upload
package via Composer. Run the following command in your project directory:
Configuration
No configuration is required to start using the package. However, you can customize paths and image dimensions as needed.
Usage
Basic Example
Here’s a simple example of how to use the package to upload and resize an image:
Methods
imageUpload($file, $newImageName = null, $width = null, $height = null, $path = 'images/')
Uploads and resizes the image.
- file: Path to the original image file.
- newImageName: Name for the image (optional, a unique ID is used if not provided).
- width: Width for the resized image (optional).
- height: Height for the resized image (optional). If null or 0, the aspect ratio is maintained.
- path: Directory path to save the resized image (optional).
Error Handling
Ensure that the provided image path is correct and that the directory has appropriate write permissions. The package will throw exceptions for unsupported image types or invalid paths.
Contributing
If you'd like to contribute to the development of this package, please follow these steps:
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push your branch and submit a pull request.
License
This package is licensed under the MIT License. See the LICENSE file for more details.
Contact
For any issues or questions, please open an issue on the repository or contact [email protected]
You can visit this repository : https://github.com/nijwel/image-upload.git
All versions of image-upload with dependencies
guzzlehttp/guzzle Version ^7.2
laravel/framework Version ^10.10
laravel/sanctum Version ^3.3
laravel/tinker Version ^2.8
laravel/ui Version ^4.2
pusher/pusher-php-server Version ^7.2