Provide local file system support for Site Studio components

Created on 24 September 2024, 6 months ago

Problem/Motivation

The 1.1.x โ†’ release of the Acquia DAM โ†’ module provides a configuration option that allows the images stored in the Widen DAM to be downloaded and served from the Drupal local file system. This functionality doesn't works as expected with Site Studio components.

When Site Studio module is enabled and when Media or Image component is used in the layout canvas, users can choose the images from the Acquia DAM. However, the images are still being served directly from Acquia DAM instead of following the expected behavior i.e Downloading the image from Acquia DAM, serving it from the local file system, and render it particularly when Download & Sync option is selected for Acquia Dam Image media type.

Proposed resolution

This issue arises because in the Image/Media components of Site Studio, the token asset-path is being used, which replaces token with in the form:
acquia-dam://<asset_id>/<version_id>
This bypasses the configured behavior of local serving of images.

The solution likely involves altering this behavior to resolve the image path according to the configuration selected for media (i.e., downloading image from Acquia DAM and serving locally). The token resolution logic should respect this configuration.

Remaining tasks

  1. Investigate the token replacement logic in acquia_dam.tokens.inc file for token asset-path.
  2. Modify the logic so that the token asset-path resolves to the local path when the Download & Sync configuration selected for given media type.
  3. Test the changes to confirm that images are correctly served from the local file system when media is configured so.
  4. Add (or update) PHPUnit tests to cover this feature.
๐Ÿ“Œ Task
Status

Active

Version

1.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia vishalkhode

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024