Ability to edit thumbnail manually or programmatically

Created on 8 June 2020, over 4 years ago
Updated 16 September 2024, 2 months ago

Problem/Motivation

Right now there is no way to edit media thumbnail when media thumbnails module is enabled.
We can enable thumbnail field, to be accessible by media edit form using

function mymodule_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
  if ($entity_type->id() == 'media') {
    // Allow uploading or removing the thumbnail image.
    $fields['thumbnail']->setDisplayConfigurable('form', TRUE);
  }
}

Media thumbnails module invokes on hook ENTITY_TYPE_presave, so everytime when we want to edit our thumbnail, setup image alt etc, it is impossible because manager override our changes. The second use case where it is impossible is during media import.

Proposed resolution

We should provide a way to skip update media thumbnail.

Remaining tasks

#

User interface changes

#

API changes

#

Data model changes

#

Release notes snippet

#

Original report by [steveoriol]

Need to overwrite some of the posters... #3137079: Need to overwrite some of the posters... β†’

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland lamp5 Rzeszow

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.

Production build 0.71.5 2024