If you accidentally add files to a commit, it’s easy to remove them through the cli.
To remove one file:
git reset imageidontwant.jpg
To reset all added files. (You’ll have to re-add the files you actually want to add to the commit.) Simply type
git reset
That will unstage any files. It will not undo commits. That’s a more complicated process.