[feature] Unify identical media files
gancio issues - Wednesday, November 20, 2024I can envision several events sharing the same image, without being from the same recurrence. When these events are displayed, multiple identical images are requested by the clients.
Having all of them have the same URL would reduce the number of requests and improve caching.
I imagine this could be achieved by the following steps:
1. Media file basenames are not chosen randomly (this seems to be the current state), but instead based on a SHA-256 hash of the contents.
2. To ensure appropriate deletion, there would need to be some reference counting (e.g. check whether the media URL is still referenced by another event).