Download the PHP package teamzac/cloudinary-url-builder without Composer

On this page you can find all versions of the php package teamzac/cloudinary-url-builder. 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 cloudinary-url-builder

Fluent Cloudinary image transformations

Latest Version on Packagist

Cloudinary is awesome but I wanted a more expressive way to apply transformations to an image than their official package provides. This is not a replacement for the official API client, it just provides a different way to generate image URLs based on the transformations you wish to apply. It also provides a way to create pre-defined groups of transformations as presets.

Installation

You can install the package via composer:

Usage

This package uses the official Cloudinary PHP library under the hood, which has a variety of global config options. If you are using Laravel, the auto-registered service provider for this package will set the default cloud name for you based on the value in this package's config.

You can set this value by adding a key for CLOUDINARY_CLOUD_NAME to your .env file. If you'd like to take ownership of the package's config file, you can run the following command:

and choose the TeamZac\Cloudinary\ServiceProvider option.

The core functionality is provided with the TeamZac\Cloudinary\Builder class. You can access it directly, or utilize the facade, to apply transformations and generate an image URL.

To build a pre-defined set of transformations, you can subclass the Builder class and override the initializePreset method. There, you can apply all the transformations you want. This method gets called before building the URL, and only once in case you plan to reuse the same instance of your preset class.

You can instantiate your own preset classes directly, or you can extend the Builder in a service provider to name your presets. You can then create a new instance using the preset method:

This could be useful for something like a hero image on a blog, where you want a similar transformation to be applied to each image but might have a light and dark variant. You could store the transformation preset on the post model and dynamically refer to it in your template.

Most of the effects Cloudinary provides are either parameterless or just allow a single value. In many cases, we've included the same defaults that Cloudinary uses so you can exclude passing any parameters if you're fine with the defaults. We still need to add Cloudinary's defaults to some of the effect methods.

In some cases, the effects can be a bit more complex. For example, you can create an Outline effect using the outline method, with an optional callback to customize additional options:

Testing

Todo

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of cloudinary-url-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
cloudinary/cloudinary_php Version ^1.18
illuminate/support Version ^7.0|^8.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 teamzac/cloudinary-url-builder contains the following files

Loading the files please wait ....