Ability to edit thumbnail manually or programmatically

Created on 8 June 2020, about 4 years ago
Updated 5 June 2024, 21 days 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

RTBC

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.69.0 2024