Subject: 29.0.50; Image-dired is not reusing thumbnails created in emacs-27

From: Thierry Volpiatto <[email-masked]>
Date: Thu, 13 Jan 2022 19:53:23 +0000

After further searching, I discover image-dired is using sha1 to build
thumbnail filenames whereas in emacs-27 it uses md5, so the names are
differents and a new file is created.
I must use a different function to avoid duplicating all thumbnails,
using something like this:

    (cl-letf (((symbol-function 'sha1) #'md5))
      (image-dired-thumb-name file))

And while I was at it I used a cache to avoid calling md5 each time I
toggle or revisit an image directory with thumbnails, probably dired
should do the same as well, but it is a different issue.

-- 
Thierry