Prevent figure thumbnails from breaking out of their containers