sed file rename

Ubuntu -very new to shell scripts/Linux
I have many pictures with "FAMILY", "family" mixed in the file name and not all in the same directory;

I want to remove "family" case insensitive from the filenames;

find /media/Rock/pics/pics_bak/ -type f "*family*" | sed 's#family##gI'
# works for print but not to rename the file
find /media/Rock/pics/pics_bak/ -type f -iname "*family*" | rename 's#family##gI'
# error     Having no space between pattern and following word is deprecated at (eval 1) line 1,             <STDIN> line 37.
        Bareword found where operator expected at (eval 1) line 1, near "s#family##gI"

I tried various loops to assign sed result to variable so I can use mv without success

if file pattern is inconsistent and not necessarily in the same directory, am I approaching this the wrong way? I see many search and replace samples but didn't see samples with inconsistent pattern/directory

I did not test this at all, so proceed at your own peril.

find /media/Rock/pics/pics_bak/ -type f -iname '*family*' |
while IFS= read -r f; do
    mv "$f" "${f%/*}/$(printf '%s\n' "${f##*/}" | sed 's/family//gi')"
done

Regards,
Alister

awesome Alister! Thanks a ton, it does not work for files inside directories but that gets me so much closer.. I'll keep working on it