getRemoteThumbnailUrl() for YouTube returns cached thumbnail

Created on 17 January 2023, over 1 year ago

Problem/Motivation

getRemoteThumbnailUrl() is returning video thumbnail cached by youtube CDN.

web/modules/contrib/video_embed_field/src/Plugin/video_embed_field/Provider/YouTube.php getRemoteThumbnailUrl() method.

Steps to reproduce

  1. Create a media with youtube embedded video and check the thumbnail.
  2. Change the thumbnail from youtube.(from Youtube studio)
  3. Delete previously created media.
  4. Now create media again with same youtube video link and check thumbnail.

You can see the old thumbnail in this newly created media.

Proposed resolution

This is because Youtube CDN caches the thumbnail images and requested thumbnail images will be served by CDN.
We can add current timestamp as query parameter to the request uri.

🐛 Bug report
Status

Needs review

Version

2.5

Component

Code

Created by

🇮🇳India sahal_va

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.

No activities found.

Production build 0.69.0 2024