Problem/Motivation

https://www.drupal.org/project/drupal/issues/3298701 was included in Drupal 10.3. If you update to 10.3 (or later) and use video_embed_field with your site set to use private local files, derivatives of the remote video thumbnail can no longer be generated due to schema mismatch ("The scheme for this image doesn't match the scheme for the original image"). The video_embed_field module seems to be hard coded to download and store the video thumbnail in the public filesystem (and record the file in the file_managed table), rather than being a config option on the video embed field or adhering to the site-wide local file system setting. When Drupal tries to create a derivative/images style it attempts to create one in the private files area, which fails.

Steps to reproduce

  1. At /admin/config/media/file-system set "Default download method" to "Private local files served by Drupal."
  2. Ensure "Private file system path" exists on the admin config screen above and double-check that it's writable at /admin/reports/status
    -- look for "File system" and make sure it's "Writable (private download method)".
  3. From a media type using video_embed_field for remote videos, add a new video from Youtube or other enabled provider.
  4. Visit the media content table listing at /admin/content/media and notice the video thumbnail image derivative (image style) isn't displayed (broken image). A generic video thumbnail may display in it's place.
  5. Look at recent log messages (/admin/reports/dblog) and view recent "access denied" errors to find one related to video thumbnail not being generated (message should be The scheme for this image doesn't match the scheme for the original image ).

Proposed resolution

Add an option, per video embed field, to set the thumbnail location including schema (like core remote video media does) or use the site default to determine where to download and store video thumbnail images.

core thumbnails location field for remote video media

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
Screenshot 2025-02-14 at 1.46.18 PM.png47.53 KBtimwood
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

timwood created an issue. See original summary.

mably made their first commit to this issue’s fork.

mably’s picture

Status: Active » Needs review

Hi @timwood, I tried to implement a simple solution that uses the Drupal system file default scheme.

Could you give it a try and see if it fixes your problem?

timwood’s picture

Status: Needs review » Reviewed & tested by the community

Hi @mably. Thanks so much for the MR/patch! I like the simple solution you've implemented and after testing it against the 3.0.0-alpha4 release, I can confirm it does fix our issue. Original video thumbnail and image style derivatives are both stored in our site-wide default private files scheme.

  • mably committed acab7261 on 3.0.x
    Issue #3506832 by mably, timwood: Image style derivatives not being...
mably’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.