This project is an image upload service built with Laravel and Livewire. It allows users to upload images to a server and provides a URL for each uploaded image.
- Real-time image upload with preview
- URL generation for uploaded images
- File type and size validation
- Support for multiple image formats (configurable)
- Laravel: A PHP framework for building web applications following the MVC pattern.
- Livewire: A Laravel library for building dynamic server-side components.
- (Other libraries listed in
composer.json
)
- Clone this repository to your local machine
- Navigate to the project folder in your terminal
- Run
composer install
to install the project dependencies - Run
npm install
to install the necessary Node.js packages - Copy
.env.example
to.env
and configure your environment variables - Run
php artisan key:generate
to generate an application key - Run
php artisan migrate
to set up the database - Run
php artisan storage:link
. On shared hosting, you may need to usephp artisan storage:link --relative
if you get a 403 when loading images - Run
npm run build
to compile your assets
You can configure the allowed file types and maximum file size in the config/filesystems.php
configuration file under the upload.allowed_file_types
and upload.max_file_size
keys respectively.
Navigate to your application's URL in your web browser to see the image upload interface. Select a file to upload and click the upload button. Once the image has been uploaded, you will be provided with a URL that you can use to access the image.
Contributions are welcome. Please open an issue or a pull request if you have something you would like to add or change.
This project is licensed under the MIT license.