Thumbnail image regeneration

Created on 19 March 2024, 6 months ago

Problem/Motivation

Users don't have any way to regenerate the generated thumbnails if the video preview is updated.

Steps to reproduce

  1. Install the module and configure any content type with the field video.
  2. Choose the Video Embed widget on the form display.
  3. Choose the Embedded Video Thumbnail formatted for the entity display.
  4. Create a video on any of the supported video providers.
  5. Create a node and add the created video to the field.
  6. Open the node view page to generate a thumbnail.
  7. Edit the video created in Step 4 and set a new preview image
  8. Open a node view page again and you find that the thumbnail image is still old.

Proposed resolution

The module provides local storage of video previews, and I don't think that this behavior should be changed. So, I think we should provide a way to allow users to regenerate images.
The module structure is built in a way to keep a place where images should be stored, and then the field formatter generates a thumbnail if can't find a file.
So, it seems to me that we should create a file entity for the thumbnail and store its ID instead of the path to the file.
Then if a preview is updated user will able to refresh it by resaving the video entity by removing and adding the same link on the video in field.

So plan is:

  • Update the VideoEmbedWidget and ther image file creation
  • Update the VideoEmbedThumbnailFormatter to support new module behavior
✨ Feature request
Status

Active

Version

3.0

Component

General

Created by

πŸ‡ΊπŸ‡¦Ukraine _tarik_ Lutsk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024