Sometimes it may be needed to fix urls added by content editors in web parts (in this article we will consider ContentEditorWebPart and ImageWebPart, but you can extend the script for your own needs as you will need), e.g. when content was created on the test environment and then migrated to production. The following PowerShell script will do it automatically:
Script enumerates through all site collections, sites, pages and web parts, finds all ContentEditorWebPart and ImageWebPart on the pages and then changes old url (stored in $oldUrl variable) on new url ($newUrl). Also it fixes links inside standard PublishingPageContent field of the publishing pages.
As I wrote you can easily extend it for changing web parts of other types. Hope that it will helpful.