Download the PHP package vishal-pawar/image-convert without Composer
On this page you can find all versions of the php package vishal-pawar/image-convert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vishal-pawar/image-convert
More information about vishal-pawar/image-convert
Files in vishal-pawar/image-convert
Package image-convert
Short Description this package can convert you image into webp and desired resolution
License MIT
Informations about the package image-convert
THIS PACKAGE CAN CONVERT YOUR IMAGE IN TO WEBP AND DESIRED RESOLUTION
HOW TO USE
add this line in the composer json file
composer require vishal-pawar/image-convert:v1.0.0 -w
run this command to install the package
Now, go through these steps for converting image into webp and desired resolution using our library :
firstly you need to use the helper function on the top of the file use VishalPawar\ImageConvert\helper\ImageHelper;
Now let's see the available functions
- saveImage()
- resizeSaveImage()
- saveWebpImage()
- resizeSaveWebpImage()
Save Image Function
This function accepts 3 param
- path ('uploads/directory')
- image
- objectStore(optional, true/false , 0/1)
Here is an example code snippet
In above code we are saving normal jpg images with object store disable by default
Resize & Save Image
This function accepts 5 param
- path ('uploads/directory')
- image
- hight
- width
- objectStore(optional, true/false , 0/1)
Here is an example code snippet
In above code we are saving normal jpg/png images with object store disable by default
saveWebpImage function
This function works same as saveImage
but it can convert you png/jpg image into webp formate webpImage
.
This function accepts 3 param
- path ('uploads/directory')
- image
- objectStore(optional, true/false , 0/1)
Here is an example code snippet
In above code we are saving normal jpg images with object store disable by default
Resize & Save Image
This function works same as resizeSaveImage
but it can convert you png/jpg image into webp formate resizeSaveWebpImage
.
This function accepts 5 param
- path ('uploads/directory')
- image
- hight
- width
- objectStore(optional, true/false , 0/1)
Here is an example code snippet
In above code we are saving normal jpg/png images with object store disable by default
HOW WE CAN USE THE OBJECT STORAGE FUNCTIONALITY
To save you Image into Object storage like digital ocean
Create Config File in you app/config
folder with name ImageConvert.php
specify these things to getting started