Find a file in the home directory with a name ending in .jpg, .jpeg, .gif, .png, or .pdf, then sort the results randomly and display the last one.
find ~/ -iregex '.*\.\(jpe?g\|gif\|png\|pdf\)$' |sort -R |tail -1