Download the PHP package vinterskogen/laravel-uploaded-image without Composer

On this page you can find all versions of the php package vinterskogen/laravel-uploaded-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-uploaded-image

Uploaded image for Laravel

Build Status StyleCI Latest Stable Version

Gracefully deal with resizing, cropping and scaling uploaded images in Laravel apps.

About

This package allows you to retrieve an uploaded image object from request, apply manipulations over the image content and then place the result to file storage in a few lines of code.

Under the hood this package is using Intervention Image - a PHP image handling and manipulation library.

Installation

Install via Composer:

composer require vinterskogen/laravel-uploaded-image

Check the Installation page for full information about package requirements and notes.

Usage

For example your app has a controller that handles the users' avatars uploads and saves the avatar images to file storage. You want that avatars to fit to 250x150 pixels and to be encoded into PNG format.

This can be done as easy as:

The $request object now have an image method, that works just like the file method - retrieves an image file from the input and returns it as an instance of Vinterskogen\UploadedImage\Uploadedimage class.

This class extends the Laravel's Illuminate\Http\UploadedFile and implements a number of helpful image handling methods.

Note: to be sure the file you are going to handle like an image is actually an image file, you have to apply form request validation constraints on your input (if you haven't done that yet, of course).

Image handling methods

The list of public image handling methods that are available on Uploadedimage instance:

Fit

fit(int $width, int $height) – resize and crop the uploaded image to fit given width and height, keeping aspect ratio.

fitSquare(int $size) – resize and crop the uploaded image to fit a square with given side size, keeping aspect ratio.

Crop

crop(int $width, int $height, int $x = null, int $y = null) – crop uploaded image to given width and height.

Encode

encode(string $format, int $quality = null) – encode uploaded image in given format and quality.

Scale

scale(int|float $percentage) – scale the uploaded image size using given percentage.

Resize to width

resizeToWidth(int $width) – resize the uploaded image to new width, constraining aspect ratio.

Resize to height

resizeToHeight(int $height) – resize the uploaded image to new height, constraining aspect ratio.

Height

height() – get height of uploaded image (in pixels).

Width

width() – get width of uploaded image (in pixels).

License

The MIT license. See the accompanying LICENSE.md file.

Credit

Vinter Skogen, 2017-2022


All versions of laravel-uploaded-image with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
intervention/image Version ^2.2
illuminate/support Version ~5.4
illuminate/http Version ^5.4.15 || ~5.5
symfony/http-foundation Version ~3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vinterskogen/laravel-uploaded-image contains the following files

Loading the files please wait ....