Install

Works with Drupal: ^9.3

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 142.49 KB
MD5: 025643e13792fec55a0e7286782b7bb1
SHA-1: 62041d04d0902708dec8635d298869f865f11a0b
SHA-256: 9c4951f9fc338cad3526d8f553d063b032206c7d91608c6c4ec32c31d4a639b3
Download zip 207.79 KB
MD5: 392fad0dd8bf94977f581296626b091c
SHA-1: 50362e7d6e0d6f7ba8e975aa330a5da5a920e617
SHA-256: 603dd1f2f366d1763e44759e2e60cb6342eabede4dde4d86486dd8cc89f399a4

Release notes

Full rework of functionality how images and videos are rendered by using custom render element cloudinary_image and cloudinary_video.

New form element cloudinary_media_library is now available to integrate cloudinary into forms with maximum performance.

Each render/form element has example usage in their definition. e.g. cloudinary_image.

$build['image'] = [
  '#type' => 'cloudinary_image',
  '#public_id' => 'cld-sample',
  '#alt' => t('Sample image'),
  '#raw_transformation' => 'f_auto/q_auto/c_fill,w_400',
  '#attributes' => ['class' => ['demo-image']],
];

Breakpoints and default image transformation will be applied automatically unless you mention to not use them.

Here is example of form element:

$form['image'] = [
  '#type' => 'cloudinary_media_library',
  '#resource_type' => 'image',
  '#preview' => TRUE,
  '#title' => $this->t('Image'),
  '#description' => $this->t('Choose an image from cloudinary media library.'),
];

The value will be stored in specific format: cloudinary:<resource_type>:<delivery_type>:<public_id>

New service available cloudinary_media_library_widget.asset_generator to render asset by using value from the form element.

The module provides an example form /admin/config/media/cloudinary/example with form elements for overview.

Created by: nginex
Created on: 5 Oct 2022 at 10:58 UTC
Last updated: 5 Oct 2022 at 10:58 UTC
Bug fixes
New features
Unsupported

Other releases