#!/bin/bash

set -e

for image in *JPEG; 
do 
    EXIFDATE=`sips -g creation $image | ack --output="\\$1" "creation: (.+)"`;
    EXIFDATE=$(date -j -f "%Y:%m:%d %H:%M:%S" "$EXIFDATE" +"%Y-%m-%d_%H%M%S"); 
    EXTENSION="${image##*.}";
    NEWFILENAME="$EXIFDATE.$EXTENSION";
    mv $image $NEWFILENAME;
done

Rename images with its exif creation date
Rename images with its exif creation date

Renames JPEG images in the current directory using its creation date from the EXIF metada.

**It uses sips and ACK**. Check if you have those tools available.
**It may cause problems if the images don't have EXIF metadata**