Module provides plugins that extend Media library to pull in Crowdriff assets as media entities. Provides custom media entities for Crowdriff images and videos.

Required

- Drupal 9 or 10
- Crowdriff API Key/Token is required.

Required Modules

- Media Core
- Crowdriff API (https://www.drupal.org/project/crowdriff_api)
- Entity Usage (https://www.drupal.org/project/entity_usage)
- Field Group (https://www.drupal.org/project/field_group)
- Media Library Extend (https://www.drupal.org/project/media_library_extend)

Composer Setup

Require package/module:

composer require drupal/media_library_extend_crowdriff

Installation/Setup

Install and enable module via drush.

drush en media_library_extend_crowdriff
drush cr

General settings can be managed here:
`admin/config/media/crowdriff`

Media panes can be configured here if needed:
`admin/config/media/media-library/pane`

For Entity usage configuration, module provides configuration to report and
track usage on Media entities.

Entity usage settings can be managed here:
`admin/config/entity-usage/settings`

Uninstall

Crowdriff media entities need to be removed before module can be uninstalled.
On the uninstall page: `admin/modules/uninstall`, user will be warned as such
and given the option to delete media entities.

Any imported configuration by the module will also be removed. User will also
be prompted/warned as such when uninstalling the module.

Media fields referencing Crowdriff media types, should also be updated prior
to uninstallation.

Crowdriff media types will be removed after module is uninstalled.

General Usage/Setup

Setup Crowdriff API Key

Crowdriff API key will need to be configured here before continuing:
`admin/config/services/crowdriff`

Setup Crowdriff Caching/Cron

Cron and sync settings can also be configured here:
`admin/config/media/crowdriff`

Caching is turned on by default and is useful for storing API responses based
on specified filter criteria. This helps reduce the number of hits against the
API service.

Cron can be turned on or disabled depending on your needs. Keep in mind, that
refreshing assets will require this setting to be activated. Assets are added
to a queue for processing and are not real time. Queues can be managed
manually through Queue UI module or via drush commands.

Setup Crowdriff Media Field

Here are some basic steps to setup a general media field, which uses Crowdriff
media types.

  1. Select entity or node, add new "Media" field.
  2. Specify your limit or unlimited.
  3. Under "Media type", select "Crowdriff Image" & "Crowdriff Video". Or just one, depending on your needs.
  4. Under "Form Display", make sure field is using "Media Library" as widget.
  5. Now when adding new entity/content, click on "Add Media" button and you should see Media library panes such as "Remote Crowdriff Images" or
  6. Remote Crowdriff Videos". These panes will only appear when associated media type is enabled on media field.
  7. Crowdriff assets will be listed under these panes and are available to pull down as a media entity.

Media Overview

Crowdriff media overview is provided and can be accessed here:
`admin/content/crowdriff` or under "Content".

This page provides an overview of the Crowdriff media assets currently pulled
down and stored in Drupal.

Assets in this view can be queued up for refreshing via the action or through
the entity operation. Crowdriff media entity edit pages also include a button,
which will also queue up the asset for refreshing.

Missing Assets View

Crowdriff missing assets view is provided and can be accessed here:
`admin/content/crowdriff/missing-assets`.

This view essentially filters out Crowdriff media that has been flagged as not
being found on the Crowdriff API service anymore. When this case occurs, a
flag on the media entity is set to indicate this specific case.

Not sure how often this case will occur, but probably not often.

Unused Assets View

Crowdriff unused assets view is provided and can be accessed here:
`admin/content/crowdriff/unused-assets`.

This view essentially filters out Crowdriff media that has an entity usage
count of 0 or is empty. Entity usage module provides the media tracking and
usage data. With this view, one can determine which assets are not in use or
referenced by any content on the site.

If media entity is not referenced, it's most likely safe to delete.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Project categories: Media
  • Ecosystem: Media Library Extend
  • Created by geoanders on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases