Show the x most recent pictures in a directory

Hi,

I just started having a go with Hassio and more recently UI-Lovelace.
Fantastic options to show off your data.

I had this idea to have a Lovelace view dedicated to the 10 most recent animated GIFs that I took whenever the doorbell was rung.
I have these in the /config/www/voordeur/ directory formatted as :
YYYY.MM.DD-HH.MM.SS.gif

Can I script a YAML file in such a way that it displays the most recent pictures in for instance a Lovelace picture card?

Thanks in advance for all your time!

1 Like