Find all files with the extension .jpg and rename them by adding a random string and the original extension at the end of the filename.
find . -name "*.jpg" | xargs -i rename 's/(.*)$/{}_{random}.{ext}/e' '{}'