Find all files with the extension .jpg in the current directory and its subdirectories, and search for the string 'StringToFind' in each of them.
find ~ -type f -name "*.jpg" -exec fgrep -H 'StringToFind' {} \;