To avoid repository bloat, don't save images and instead store some kind of symbolic reference to another storage and a way to retrieve this reference from the given storage.
An external store comes with some security, performance and usability issues, but may be worth it in the long run.
The main motivation for this is that images are not meant to be stored as is in a git repository. Solutions such as Git LFS on GitHub are horrendously overpriced for FOSS repositories. Another issue with storing images in a git repository is that they are often optimized to account for aforementioned bloat. This optimization can take quite long even on updates which introduce only a minor change to the reference, as comparison is not perceptual, but exact.
See more on a related discussion on the Typst community discord here.
To avoid repository bloat, don't save images and instead store some kind of symbolic reference to another storage and a way to retrieve this reference from the given storage.
An external store comes with some security, performance and usability issues, but may be worth it in the long run.
The main motivation for this is that images are not meant to be stored as is in a git repository. Solutions such as Git LFS on GitHub are horrendously overpriced for FOSS repositories. Another issue with storing images in a git repository is that they are often optimized to account for aforementioned bloat. This optimization can take quite long even on updates which introduce only a minor change to the reference, as comparison is not perceptual, but exact.
See more on a related discussion on the Typst community discord here.