I've fixed it again, thus solving the problem once and for all
All previously uploaded images are still available on a storage bucket (but with a corrupted index file), so if anyone wants to try to reconstruct things at their own peril, they can reach out to me for access...