jeanquark / uploadResizedImage

How to pick up image dimensions when uploading with PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload Resized Image with PHP

Pick up aspect ratio when uploading images to your server. Build under Laravel 5.2. To view a live demo, go here. To have the process fully explained, read this article.

Example

Original image and uploaded image: transformation

Installation

Make sure you have a running web server on your computer (for example xampp). Open your favorite CLI and move to the folder that will hold the project (typically C:\xampp\htdocs for xampp users). Then type the following commands:

First clone the repo

git clone https://github.com/jeanquark/uploadResizedImage.git

cd to the newly created folder and install required dependencies

composer update

copy .env.example file and save it as .env. Then generate application key

php artisan key:generate

Head over to the homepage and click the upload image link.

Screenshots

Homepage: homepage

Upload page: upload

Upload result: upload_result

About

How to pick up image dimensions when uploading with PHP


Languages

Language:PHP 98.6%Language:ApacheConf 0.7%Language:JavaScript 0.6%Language:CSS 0.1%