Install

Works with Drupal: ^9.3

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 142.49 KB
MD5: 14e08f35c803607955700c4eb340478a
SHA-1: 716139d18cf7f5b5f3f2758d0f5e3cf823a0ef4a
SHA-256: e8a4b5f32091a4eee8517d51e4fd07700479c92546bccec07bbeb73a8eb4225d
Download zip 207.79 KB
MD5: 3978ece4988edd88c73b70535990121b
SHA-1: 9c02027bd866b2d78790a2fcb445f5d85f38f163
SHA-256: 0977c2286d25a008b081abd76a84be6bdfa1bfabc2aed1a57a6875b2421d460e

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:21 UTC
Last updated: 5 Oct 2022 at 10:22 UTC
New features
Unsupported

Other releases