After update from 1.2 to 1.5, thumbnails are broken for oembed video and other media types

Created on 24 March 2023, over 1 year ago
Updated 3 August 2023, over 1 year ago

After update from 1.2 to 1.5 the oembed video thumbnails are broken.

I prepared a quick patch that fixes the issue, but maybe you can find a more elegant solution.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia nortmas Crimea/Thailand

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

Comments & Activities

  • Issue created by @nortmas
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States ndewhurst USA

    Hi, I maintain the Brandfolder β†’ module, which provides a media source plugin for images that are ultimately stored in that external DAM. Drupal media entities using that source do have an image field and a media thumbnail (which are effectively identical, such that the thumbnail alt & title attributes can be updated and translated). However, the "source field" for those media entities is not an image field, so the latest version of this module is not working with those media types. This is the same situation as for oembed and other media sources.
    Here is a patch that flips the logic a bit and says "try to use the media entity's source field if this is a standard image-sourced media item; otherwise, use the thumbnail."

  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States djdevin Philadelphia

    Had the same issue with Bynder β†’ , probably functions the same way.

    Patch fixes the issue.

  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States djdevin Philadelphia

    This works but when using Bynder (or another media provider) the alt text is lost because $source_field isn't an image.

    This is not the fault of the patch as it was missing before. But I changed the patch around so that it would find the first image field on the media.

    Not sure if this is the best approach but it does fix the alt text. Responsive thumbnails still seem to work.

Production build 0.71.5 2024