Alt Attribute on Video Thumbnail

Created on 1 March 2019, over 5 years ago
Updated 27 October 2023, about 1 year ago

Thank-you for your time and contribution. I personally appreciate it greatly.

The alt attribute on YouTube thumbnails is empty. Not sure if this is because it needs to be set on the YouTube side and is empty in my case or if it's something that should/could be set on the Drupal side. For example:

<img src="/sites/default/files/styles/medium/public/video_thumbnails/pwmZ0VB913w.jpg?itok=MVNkETrM" alt="" typeof="foaf:Image">

It would be great if the alt attribute were automatically populated with the title attribute of the video or at least configurable with a field formatter in the entity field and in a view, similar to the D7 version found here: https://www.drupal.org/project/video_embed_field/issues/1926872 β†’

✨ Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sassafrass

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.

  • πŸ‡ΊπŸ‡¦Ukraine dunot

    Thanks, dshields.
    Be carefull with #14 in case of CKEditor`embedded video: the patch doesn't support this case
    and causes
    ArgumentCountError: Too few arguments to function Drupal\video_embed_field\ProviderPluginBase::renderThumbnail(), 2 passed
    to prevent this add

    +   $attributes = [];
    -   $thumbnail = $provider->renderThumbnail($embed_data['settings']['image_style'], '');
    +   $thumbnail = $provider->renderThumbnail($embed_data['settings']['image_style'], '', $attributes);
    

    to modules/video_embed_wysiwyg/src/Plugin/Filter/VideoEmbedWysiwyg.php

  • πŸ‡«πŸ‡·France selinav

    Are there plans to add it to the next version?

Production build 0.71.5 2024