image.nvim
image.nvim copied to clipboard
Non-png files always miss the cache
Because a random ID is used in the converted filename for non-PNG images, the cached converted files are never used, and the conversion happens every time the same image is loaded:
https://github.com/3rd/image.nvim/blob/5f8fceca2d1be96a45b81de21c2f98bf6084fb34/lua/image/image.lua#L303-L320
Replacing the random ID with a hash based on the original filepath would solve this, but I'm unsure whether that would have unintended consequences?
local id = opts.id or utils.hash.sha256(absolute_original_path)
Hey, I don't think it would break anything, will check!