How to pick up image dimensions when uploading with PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
config
database
public
resources
storage
tests
.env.example
.gitattributes
.gitignore
artisan
composer.json
composer.lock
gulpfile.js
package.json
phpunit.xml
post.txt
readme.md
server.php

readme.md

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