The Wedia Drupal Content Picker is a module for Drupal, compatible with Drupal versions 9 and 10, designed to facilitate integration between your Wedia Digital Asset Management (DAM) and your Drupal Content Management System (CMS).
With the Drupal Wedia module, you can easily:
Create new Wedia Image, Wedia Video, and Wedia Asset fields that can be seamlessly added to your Drupal content types.
Select assets from your Wedia DAM library using a variety of search features, including filters, full-text search, and board lists.
Enjoy support for Drupal Image styles, which allows you to customize the display of your images according to your specific needs.
Crop images within Drupal using the Wedia Drupal module’s built-in support for image cropping.
All images and videos are streamed inserted into Drupal are streamed for the Wedia DAM, avoiding content duplication, and right management issues. The Wedia DAM also collects analytics data to report how your images and videos are performing as marketing assets on your website.
Installing the Wedia Drupal Content Picker
The module is available here : https://www.drupal.org/project/wedia
Installation Procedure for the Module:
Method 1: Using Composer (recommended)
Connect to your Drupal server via SSH.
Launch the following command at the root of your Drupal project:
composer require 'drupal/wedia:^1.0'
Go to the default site folder (or another folder if using a multi-site configuration):
cd web/sites/default
Activate the module:
drush en wedia
(OR, if Drush is not installed globally on the server)
../../../vendor/bin/drush en wedia
Method 2: ZIP and FTP (wedia.zip)
Download the package archive from the module release page:
(change the version from 1.0.0 to the latest available version)
[ZIP] → https://ftp.drupal.org/files/projects/wedia-1.0.0.zip
[TAR.GZ] → https://ftp.drupal.org/files/projects/wedia-1.0.0.tar.gz
Decompress the archive.
Connect to the Drupal server via FTP or SFTP.
Upload the module folder to the "web/modules/custom" or "modules/custom" folder, depending on the initial Drupal installation.
Log in to the Drupal back office (/user/login).
Go to the modules page (/admin/modules).
Check the "Wedia" module box.
Click "Install" at the bottom of the page.
Updating the Wedia module to the latest version
When a new version is released, you can upgrade to the latest version by using the following command:
You can update the module with the following command:
composer update
Then, clear Drupal's caches using the command:
drush cr
Settings for the Wedia Drupal module
Settings the Wedia Drupal module are available in the dedicated section in the Drupal Configuration:
Setting the Wedia Server
The URL of the Wedia server your are connecting to is mandatory. It defaults to our demo website.
Configuring the Wedia user interface for the content picker
Some user interface elements of the Wedia Content Picker can be deactivated for a streamlined experience:
Setting the analytics tracking behaviour for video
DNT is a privacy feature that stands for “do not track”. It is supported by Wedia to enable or disable the very precise analytics on video playing gathered by the Wedia video player.
To enable or disable tracking behaviour for video analytics, you can customize this feature on a per-embed basis by adding "&dnt=true" or “&dnt=false” to the video's embed code, in the query string.
By default, for a better user privacy, we disable tracking for all videos by adding "dnt=true" to every embedded video.
If you have installed a GDPR cookie banner on your Drupal website and are using a "per user" choice to manage this parameter on pages where the video is displayed, you can disable this default option and manually control the "dnt" parameter.
Setting up token based video protection
If you have enabled on your DAM the toke based video protection, you need to add the secret code provided by Wedia and the duration of the validity of the generated token. If you leave these parameters blank, token based protection will be disabled.
Setting up the size of the images in the CK Editor text field
The Wedia Content Picker can be used to insert images into a HTML field managed, edited by CK Editor.
In that case, multiple behaviours are available for the image size :
Let the template/theme manage the image dimensions : images will be inserted without information about the height and width. This can be useful if the Drupal theme takes over the rendering and forces the image sizes, by passing size info into the rendered IMG SRC value. The Wedia Digital Transformation API support multiple parameters :
[SERVER BASE URL]/api/wedia/dam/transform/[UUID]/[BASE VARIATION]/[FILE_NAME][.FILE_EXTENSION]/t=[TRANSFORMATION]&[CROP PARAMETERS x=XPct&y=YPct&width=widthPct&height=heightPct&fx=x&fy=y]&outputWidth=[OUTPUT_WIDTH]&outputHeight=[OUTPUT_HEIGHT]
Please read https://crossmedia.atlassian.net/wiki/spaces/WD/pages/379551745/Wedia+Content+Picker#Processing-the-information-returned-by-the-Content-Picker-for-Images for a better understanding of these parameters.
Let the template/theme manage the image dimensions as previously, but prompt the user choosing the image to select a focus point, that can be used when resizing the image to keep the image in focus.
Force the user to crop the image to a designed height and width.
Setting the SEO keywords behaviour in the generated image SRC
In the SEO world, the image name in the IMG SRC can add context for a better search engine indexation.
The Wedia Content Picker can add keywords separated by a hyphen to the file name, as the filename can be arbitrary using the Wedia Digital Transformation API.
The default metadata added to the file names are coming from the “keyword” property, which is the default setup.
If you have set up your content picker to return other metadata in the returned JSON, you can use the returned properties to build your SEO filename.
Changing the default variation name
It allows starting the transformation based on a given variation. Usually, this parameter is empty, and the transformation always starts from the best variation. The best practice is to omit this parameter and let the system choose the best one, but if you would like to benefit from a variation that has its background removed by an AI, then the BASE VARIATION should be set to "stripped_background", that is the variation of the image that was processed by AI to try to remove the background to isolate the subject on a transparent background.
To better understand base variations : https://crossmedia.atlassian.net/wiki/spaces/WD/pages/2117828611/Digital+Asset+Transformations+and+Delivery+API#Using-a-built-in-variation
Setting up the permissions to update the Wedia module settings
The Wedia module settings can be set up by user roles set up by the Drupal permissions system:
The default setup grants administration rights to the Administrator role.
Available new fields types
The Wedia module adds 3 new fields type:
Wedia Image
Wedia Video
Wedia Asset
The Wedia Image is used when adding one or many images to a content types.
The Wedia Video is used when adding one or many videos to a content types.
The Wedia Asset is more generic, it does not filter on the asset nature, image, video, 3D, document… when picking the asset.
Wedia fields can be added to any Drupal content type, as any other field :