Faulty WordPress Database and Image Issues

Just a quick post, before I forget everything:

We had an issue with one of the wordpress installs mishandling images, for instance if you went to add a photo from your media library it would put src”” in the post/page, but the images and thumbnails themselves still existed and could be pulled up directly.

After the standard “check the theme, plugins, wordpress files, server settings” I came across a small comment about checking the database which never even occurred to me because the wordpress in question isn’t all that complex or big.

Lo and behold, after running and repair and optimize on it the images started working again properly, Media Library using thumbnails again, and “add media” functioning properly.

Thoughts?