When you moved your pictures for instance with scp or ftp, you loose picture date. This command help you to use date saved in JPG EXIF set by camera, as last modified date of file.
The EXIF handling tool exiv2 has a builtin option for this
In command-line, go to root folder of your images.
Install exiv2:
sudo apt install exiv2
Find all your images with extension JPG and replace last modified date with JPG EXIF medadata:
find -name '*.JPG' -exec exiv2 -T rename {} \;