If thumbnail is not found, it deleates the source file

Created on 17 March 2025, 19 days ago

Problem/Motivation

If for any reason thumbnails does not get created, and this module is enabled, regenerating thumbnail deletes the source file. It is because, if thumbnail is not found, it returns the source file here:
https://git.drupalcode.org/project/media_thumbnails/-/blob/8.x-1.x/src/P...

This is risky because it deletes the source file.

Steps to reproduce

* have a media without a thumbnail
* regenerate the thumbnails

Proposed resolution

* Perhaps check if field_name is thumbnail, if so, return null if not found.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada Natkeeran

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

Comments & Activities

Production build 0.71.5 2024