I'm not sure if this is an X-post from Media Entity Image: #2749695: Thumbnail not updated
When a Media entity gets updated, the thumbnail reference in media_field_data does not get updated along with it, causing the Media overview page to display the old image instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2798251-2-thumbnail-not-updated.patch | 535 bytes | Algeron |
| #2 | 2798251-1-thumbnail-not-updated.patch | 453 bytes | Algeron |
Comments
Comment #2
Algeron commentedCould be improved upon with an extra check to see whether the actual file has been updated.
Comment #3
Algeron commentedHm, I'm still encountering situations where the thumbnail is not correctly updated. New patch in attachment.
Comment #4
csedax90 commented#3 work like a charm
Comment #5
slashrsm commentedThe code change in the attached patch will trigger thumbnail logic every time media entity is saved. As that can be a slow process (some media types download thumbnails form 3rd party services) this isn't desired.
We should have some mechanism to detect or manually trigger thumbnail setting when needed.
Comment #6
chr.fritschThis is a duplicate of #2786881: Recalculate thumbnail size during update
Comment #7
jcisio commentedWe don't know beforehand if a media type plugin provides local image or it has to download a remote image first. Should the media type plugin, in case of remote image, check the media first and avoid to download again a remote thumbnail? This is a behavior change but not quite BC break, only a performance penalty when media type plugin doesn't perform the check.
An regression is that there will be no way to update thumbnail for media entities with remote thumbnail. This is a hidden feature (not exposed in UI) and we can open a less important issue to fix that.
Comment #8
ckaotikWe worked around this by enabling the Thumbnail field for the form part of the field UI:
Doing so allowed us to display the thumbnail within the media edit/create form, where the assigned image file could be removed, so it gets re-populated on save. This also allows to manually upload a thumbnail, if required.
Comment #9
keesje commentedMight be a solution for images: #2850169: Add proper image formatter for display current image
Comment #10
marcoscanoMarking this as duplicate of #2850169: Add proper image formatter for display current image and #2786881: Recalculate thumbnail size during update, please re-open if you believe this is not the case.