CREATE TRIGGER foobar
AFTER DELETE ON photo
FOR EACH ROW
BEGIN
CALL sys_exec(concat('/bin/rm -f ',filename));
END
HOWEVER, IT IS NOT RECOMMENDED.
A much better (and safer) practice is to leave the files simply on the server and run a separate batch script daily to remove the files.