Download the PHP package devscast/tinify without Composer

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

Tinify PHP

Latest Stable Version Total Downloads License

The Tinify API allows you to compress and optimize WebP, JPEG and PNG images. It is designed as a REST service. The client libraries in various languages make it very easy to interact with the Tinify API.

installation

You can use the PHP client by installing the Composer package and adding it to your application’s dependencies:

Authentication

To use the API you must provide your API key. You can get an API key by registering with your name and email address. Always keep your API key secret!

All requests will be made over an encrypted HTTPS connection.

You can instruct the API client to make all requests over an HTTP proxy. Set the URL of your proxy server, which can optionally include credentials.

Compressing Images

You can upload any WebP, JPEG or PNG image to the Tinify API to compress it. We will automatically detect the type of image and optimise with the TinyPNG or TinyJPG engine accordingly. Compression will start as soon as you upload a file or provide the URL to the image. You can choose a local file as the source and write it to another file.

You can also upload an image from a buffer (a string with binary) and get the compressed image data.

You can provide a URL to your image instead of having to upload it.

Resizing images

Use the API to create resized versions of your uploaded images. By letting the API handle resizing you avoid having to write such code yourself and you will only have to upload your image once. The resized images will be optimally compressed with a nice and crisp appearance.

You can also take advantage of intelligent cropping to create thumbnails that focus on the most visually important areas of your image.

Resizing counts as one additional compression. For example, if you upload a single image and retrieve the optimized version plus 2 resized versions this will count as 3 compressions in total.

The method describes the way your image will be resized. The following methods are available:

If the target dimensions are larger than the original dimensions, the image will not be scaled up. Scaling up is prevented in order to protect the quality of your images.

Preserving metadata

You can request that specific metadata is copied from the uploaded image to the compressed version. Preserving copyright information, the GPS location and the creation date are currently supported. Preserving metadata adds to the compressed file size, so you should only preserve metadata that is important to keep.

Preserving metadata will not count as an extra compression. However, in the background the image will be created again with the additional metadata.

You can provide the following options to preserve specific metadata. No metadata will be added if the requested metadata is not present in the uploaded image.

Saving to Amazon S3

You can tell the Tinify API to save compressed images directly to Amazon S3. If you use S3 to host your images this saves you the hassle of downloading images to your server and uploading them to S3 yourself.

You need to provide the following options in order to save an image on Amazon S3:

The user that corresponds to your AWS access key ID must have the PutObject and PutObjectAcl permissions on the paths of the objects you intend to create.

Saving to Google Cloud Storage

You can tell the Tinify API to save compressed images directly to Google Cloud Storage. If you use GCS to host your images this saves you the hassle of downloading images to your server and uploading them to GCS yourself.

Before you can store an image in GCS you will need to generate an access token with a service account.

You need to provide the following options in order to save an image on Google Cloud Storage:

Compression count

The API client automatically keeps track of the number of compressions you have made this month. You can get the compression count after you have validated your API key or after you have made at least one compression request.

acknowledgement

this package is a reimplementation of the tinify/tinify-php library, supporting PHP 8, rewritten with a design that removes static calls for a more object-oriented approach


All versions of tinify with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/http-client Version ^6.0|^7.0
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 devscast/tinify contains the following files

Loading the files please wait ....