The images are stored in /var/lib/matrix-synapse/media. Unfortunately I don’t know if deleting them will cause any issues. You can pull some information about the files from the database, using sqlite3:
sqlite3 /var/lib/matrix-synapse/homeserver.db select * from local_media_repository;
The first column is media_id. If it is, for example, nbPjqEXqAnFCVeEggNwfIQXC, then the file path will be /var/lib/matrix-synapse/media/local_content/nb/Pj/qEXqAnFCVeEggNwfIQXf.