there are lots of different solutions out there.
i think the best solution for any particular person just depends on your preferred workflow. @jcook’s naturtag application offers one way to sync up files (including file metadata) on your machine with information from iNat.
here’s an R-based way of downloading photos: https://github.com/ghuertaramos/Inat_Images. as it exists, i think observation information is captured only as suffixes to the filename, rather than in the file metadata, but i think it would be possible to adapt the script to write to file metadata.
the method that i’ve previously described for @invertebratist and others involves creating and running cURL scripts: https://forum.inaturalist.org/t/backup-what-if-inat-suddenly-disappeared/47271/20, https://forum.inaturalist.org/t/best-way-to-download-600-images/37403/4, etc… as with the above method, it doesn’t write to the file metadata, although i think it’s possible to write some additional stuff to make that happen, if desired.
…
for what it’s worth, at least for the near future, i don’t think most folks should worry too much about their iNat photos disappearing. if the situation changes, i’m sure there will be plenty of time to get your data from the system before it goes away, or otherwise, downloading your data will probably be the least of your concerns. there’s more discussion about all that in a previous thread: https://forum.inaturalist.org/t/backup-what-if-inat-suddenly-disappeared/47271.