The pr seems to suggest it's not the filename though given the new file was named the same and didn't crash.
I would guess grammarly is hooking chrome and potentially trying to read metadata about images, and the particular gif had metadata in a format they hadn't expected.