Download the PHP package visol/cloudinary without Composer

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

Cloudinary Integration - FAL Driver

A TYPO3 extension that connect TYPO3 with Cloudinary services by the means of a Cloudinary Driver for FAL. The extension also provides various View Helpers to render images on the Frontend. Cloudinary is a service provider dealing with images and videos. It offers various services among other:

Compatibility and Maintenance

This package is currently maintained for the following versions:

TYPO3 Version Package Version Branch Maintained
TYPO3 11.5.x 4.x master Yes
TYPO3 11.5.x 3.x - No
TYPO3 11.5.x 0.x - No

Installation

The extension should be done by Composer

Note that the extension will require the library cloudinary/cloudinary_php and be automatically downloaded into vendor.

Configuration

If it is not already the case, create an account on Cloudinary at first. Once the extension is installed, we should create a file storage.

For a new "file storage" record, then:

Once the record is saved, you should see a message telling the connection could be successfully established. You can now head to the File module list. Notice the first time you click on a folder in the File list module, it will take some time since the images must be fetched and put into the cloudinary cache.

Notice you can also use environment variable to configure the storage. The environment variable should be surrounded by %. Example %env(BUCKET_NAME%)

Logging

For the debug purposes Cloudinary API calls are logged to better track and understand how and when the API is called. It might be useful to check the log file in case of a low response time in the BE.

To decide: we now have log level INFO. We might consider "increasing" the level to "DEBUG".

Caveats and trouble shooting

ViewHelpers

The extension provides ViewHelpers that can be used like that:

  1. Output an images and its source-set.

This will produces the following output:

  1. Generate an array of variants that can be iterated.

CLI Command

Move bunch of images from a local storage to a cloudinary storage.

CAUTIOUS!

  1. Moving means: we are "manually" uploading a file (skipping FAL API) to the Cloudinary storage and deleting the one from the local storage (rm -f FILE) Finally we are changing the sys_file.storage value to the cloudinary storage. The file uid will be kept!

After "moving" files you should fix the jpeg extension for the Cloudinary storage by running the command below. It is worth mentioning that Cloudinary stripped the file extension for images. For instance a file image.jpg or image.jpeg uploaded on Cloudinary will be stored as image without the file extension. By inspecting the file, we will see that Cloudinary only consider the "jpg" extension. Consequently image.jpeg will be served as image.jpg. This has an implication for us. Record from table sys_file must be adjusted and occurrences jpeg in file identifier or file name must be changed to jpg for consistency.

Tip: to sync / upload a bunch of files, you can use the Cloudinary CLI which is convenient to upload many resources at once.

The extension provides also a tool to copy a bunch of files (restricted to images) from one storage to an another. This can be achieved with this command:

For your information a set of acceptance tests has been implemented to validate the functionnalities of the driver.

Development tools

Type command make at the source of the extension to display utility commands related to code formatting.

Web Hook

Whenever uploading or editing a file through the Cloudinary Manager you can configure an URL as a web hook to be called to invalidate the cache in TYPO3. This is highly recommended to keep the data consistent between Cloudinary and TYPO3.

Beware: Do not rename, move or delete files in the Cloudinary Media Library. TYPO3 will not know about the change. We may need to implement a web hook. For now, it is necessary to perform these action in the File module in the Backend.

Source of inspiration

Adapter for theleague php flysystem for Cloudinary

https://github.com/flownative/flow-google-cloudstorage


All versions of cloudinary with dependencies

PHP Build Version
Package Version
Requires cloudinary/cloudinary_php Version ^1.15
ext-json Version *
php Version ~8.0 || ~8.1
typo3/cms-backend Version ^11.5
typo3/cms-extbase Version ^11.5
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 visol/cloudinary contains the following files

Loading the files please wait ....