Image style derivatives not being created due to schema mismatch

Created on 14 February 2025, about 2 months ago

Problem/Motivation

https://www.drupal.org/project/drupal/issues/3298701 πŸ› ImageStyleDownloadController routes do not limit schemes served Fixed 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.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Video Embed Field (base module)

Created by

πŸ‡ΊπŸ‡ΈUnited States timwood Rockville, Maryland

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