digitalfabrik / integreat-cms

Simplified content management back end for the Integreat App - a multilingual information platform for newcomers
https://digitalfabrik.github.io/integreat-cms/
Apache License 2.0
56 stars 35 forks source link

Update alt texts of media files #875

Open timobrembeck opened 3 years ago

timobrembeck commented 3 years ago

Motivation

At the moment, alternative texts of media files are only updated in the content, when the content itself is changed: https://github.com/Integreat/integreat-cms/blob/3cc962c192243cad7c1cf91a3c747b49274565cc/src/cms/forms/custom_content_model_form.py#L44-L58

Proposed Solution

We should also update the alt texts, when the alt texts of the media files itself change. When saving a media file, scan the complete content for an image tag with its path and replace the alt text if found (this may make the file saving process very slow - maybe the updating of the content can be detached/run in the background?)

Alternatives

Add a cronjob which does this every day to a fixed time

Additional Context

svenseeberg commented 1 year ago

I think this is very closely related to #1878 - basically just another content type for which updating links is relevant?