Add Dynamic Responsive Image (or drimage) module to Varbase Media

Created on 26 September 2022, almost 2 years ago
Updated 4 June 2023, about 1 year ago

Problem/Motivation

drimage 2.1.0 was released on 6 Oct 2022 by weseze β†’
https://www.drupal.org/project/drimage/releases/2.1.0 β†’

Thank you, Wesley.

Proposed resolution

  • Add into the composer.json file.
  • Enable it by default in Varbase Media module.
  • Add a starter list of Aspect Ratios
    • The default set of ratios for Image Media type:
      • Media 1:1
      • Media 2:1
      • Media 3:1
      • Media 4:1
      • Media 4:3
      • Media 16:9
      • Media 21:9
    • β†’

    • The default set of ratios for Video Media type:
      • ---
      • Media 1:1: Only cover image or thumbnail - No Player
      • Media 2:1: Only cover image or thumbnail - No Player
      • Media 3:1: Only cover image or thumbnail - No Player
      • Media 4:1: Only cover image or thumbnail - No Player
      • Media 4:3: Only cover image or thumbnail - No Player
      • Media 16:9: Only cover image or thumbnail - No Player
      • Media 21:9: Only cover image or thumbnail - No Player
      • β†’
      • ---
      • Autoplay : Autoplay on load of the page for one time.
      • Autoloop : Autoplay and keep looping.
      • Looping: On click to play, the video will keep looping.
      • ---
      • Media Video 1:1 : Load Varbase Video Player
      • Media Video 2:1 : Load Varbase Video Player
      • Media Video 3:1 : Load Varbase Video Player
      • Media Video 4:1 : Load Varbase Video Player
      • Media Video 4:3 : Load Varbase Video Player
      • Media Video 16:9 : Load Varbase Video Player
      • Media Video 21:9 : Load Varbase Video Player
      • β†’
    • For the CKEditor:
      • Large (Full width)
      • Medium (1/2 of width)
      • Small (1/4 of width)
      • Original
    • Other media view modes:
      • Default
      • Background media
    • Only for admin use:
      • Field Preview
      • Media Library
      • Entity Browser Preview
  • Add the ImageAPI Optimize WebP β†’ module
  • Remove all old configs for Media Display sizes ( Size 1, Size 2, ... Size 12) , which uses the Responsive Image Styles and all shapes
  • Remove all old configs for Responsive Image Styles ( Display 1, Display 2, .... Display 12) and all shapes

Follow with Bootstrap 5 Aspect ratios
And add more CSS rations too to match with working rations on Videos and cover images In Vartheme BS5

// stylelint-disable function-disallowed-list
// scss-docs-start aspect-ratios
$aspect-ratios: (
  "1x1": 100%,
  "2x1": calc(1 / 2 * 100%),
  "3x1": calc(1 / 3 * 100%),
  "4x1": calc(1 / 4 * 100%),
  "4x3": calc(3 / 4 * 100%),
  "16x9": calc(9 / 16 * 100%),
  "21x9": calc(9 / 21 * 100%),
) !default;
// scss-docs-end aspect-ratios
// stylelint-enable function-disallowed-list

Remaining tasks

  • βœ… File an issue about this project
  • βœ… Addition/Change/Update/Fix to this project
  • βœ… Testing to ensure no regression
  • βž– Automated unit/functional testing coverage
  • βœ… Developer Documentation support on feature change/addition
  • βž– User Guide Documentation support on feature change/addition
  • βœ… Accessibility and Readability
  • βœ… Code review from 1 Varbase core team member
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Update Release Notes and Update Helper on new feature change/addition
  • βœ… Release varbase-10.0.0-alpha1 β†’ , varbase_media-10.0.0-alpha1 β†’

Varbase update type

  • βœ… No Update
  • βž– Optional Update
  • βž– Forced Update
  • βž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024