Optimization for media.filter.preview

Created on 22 September 2022, over 2 years ago
Updated 13 September 2023, over 1 year ago

As pointed out by @Berdir over at #3202501-29: webp support for drimage

Currently it is unclear what the issue is and what the solution does.
We need more info from the creator of the patch in the original issue.

+++ b/src/Plugin/Field/FieldFormatter/DrImageFormatter.php
@@ -301,6 +304,11 @@ class DrImageFormatter extends ImageFormatter {
 
+      // Media embed preview workaround
+      if (\Drupal::routeMatch()->getRouteName() === 'media.filter.preview') {
+        $elements[$delta]['#data']['media_preview'] = TRUE;
+      }
📌 Task
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇧🇪Belgium weseze

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.71.5 2024