Find all files in the current directory and its subdirectories up to a maximum depth of 2, with any name, that have an extension of .jpg, .png, or .gif, and change their permissions to 775.
find . -maxdepth 2 -name '*' \( -iname "*.jpg" -or -iname "*.png" -or -iname "*.gif" \) -exec chmod 775 {} \;