Download the PHP package drh2so4/thumbnail without Composer

On this page you can find all versions of the php package drh2so4/thumbnail. 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 thumbnail

Laravel Thumbnails

Stars Downloads StyleCI Build Status Scrutinizer Code Quality CodeFactor

Laravel Thumbnail Generator

Package for uploading the image and saving that image along with it's thumbnail.

What does it do ?

Why use thumbnails ?

The small file size of thumbnails makes it possible for website designers to offer visitors a lot of content immediately without increasing the loading time of the page. Also why use full glory of that image if you just have to crunched it up to tiny space... Use thumbnail.

Installation

Run Composer Require Command

Use thumbnail trait to your model

This model consists of following methods :-

Usages

Package utilizes it's trait method, let us guide you to use that

makeThumbnail

This method is responsible for actually uploading the image and making its thumbnail.

Same can go with update method.

thumbnail

Well, we created our thumbnail but how to use it, let me guide through that When we uploaded image with name suppose "batman". Image is upload with name batman-current_time_instant i.e (batman-1521549.jpg).

What about thumbnail... well thumbnail uses it's parent image name followed by -size i.e batman-1521549-medium-jpg, batman-1521549-small.jpg

How to make thumbnail ?

There are the options you can have for making thumbnails :-

Default Option

you can just call the following and the packages will handle the rest

Note : if the attribute dedicated for storing image is named 'image' you don't have to pass image attribute name jusr use \$image->makeThumbnail();

Universal Custom Thumbnails

here you should mention the thumbnails that you want to be applied on every case. when you publish thumbnail.php config file you will find 'thumbnails' property where you can mention your custom thumbnails

Note: This will override default option

Specfic Custom Thumbnails

Suppose you have applied Universal Custom Thumbnails but need to have changes for specific image field then you can pass array of custom requirements :

How about multiple image uploads

If you are performing multiple image upload at once pass image key to thumbnail array. here \$img is one of the image in chunk of images passed

How to use thumbnail ?

Just call as following

if you are using custom thumbnail configured from config file just call as follows

Notice that parameter of function thumbnail is string same as value given for "thumbnail-name" in config file.

Thumbnail's image property is predefined but if you wish to change that publish it's config file thumbnail.php

Image Property

You can obtaing the detail image property by using method imageDetail($image,$size)

What Image Property/Detail Gives

Default Thumbnail Image Properties

Property Return Type Description Example
image string Image path stored in DB \$image->imageDetail('image')->image
name string Image Stored Name (without extension) \$image->imageDetail('image')->name
fullname string Image Stored Name (with extension) \$image->imageDetail('image')->fullname
extension string Image Extension Name \$image->imageDetail('image')->extension
path string Image Storage Path \$image->imageDetail('image')->path
directory string Image Stored Directory \$image->imageDetail('image')->directory
location string Image Full Location Path \$image->imageDetail('image')->location
property array Image Property array \$image->imageDetail('image')->property

Image Property array (\$image->imageDetail('image')->property)

Property Return Type Description Example
real_name string Image Real Name (without timestamp and size label) \$image->imageDetail('image')->property->name
size integer Image Storage Size \$image->imageDetail('image')->property->fullname
directory string Image Stored Directory \$image->imageDetail('image')->property->directory
location string Image Full Location Path \$image->imageDetail('image')->property->location
has_thumbnail boolean Image's Thumbnail Check \$image->imageDetail('image')->property->has_thumbnail
thumbnail_count integer Image Thumbnail Count \$image->imageDetail('image')->property->thumbnail_count
thumbnails array Return all thumbnail Detail \$image->imageDetail('image')->property->thumbnails
Image Thumbnail Property Property Return Type Description
image string Thumbnail Name
real_name string Thumbnail Real Name (without timestamp and size label)
size integer Thumbnail Storage Size
created_date Carbon Thumbnail Created Date
path string Thumbnail Storage Path
directory string Thumbnail Stored Directory
location string Thumbnail Full Location Path

Check if image has thumbnail

Obtain Image Thumbnail Count

Hard Delete Image with Thumbnails

Hard Delete Image with Thumbnails adn its parent

Upload Only Umage

Our config file looks like follows :-

Feel free to change the values

Default Thumbnail Image Properties

Thumbnail Width Height Quality
Uploaded Image 1000 800 80
Medium Thumbnail 800 600 60
Small Thumbnail 400 300 30

Laravel Thumbnails

Todos

Package Used

License

MIT

DOCTYPE NEPAL || DR.H2SO4


All versions of thumbnail with dependencies

PHP Build Version
Package Version
Requires intervention/image Version ^2.4@dev
intervention/imagecache Version ^2.4
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 drh2so4/thumbnail contains the following files

Loading the files please wait ....