Fix WordPress broken images after importing XML

You’ve imported your sites XML to restore your site but yet all images start showing up as broken.

Broken image fix

I initially could not figure out what was causing this but after some research I found out that the importer was adding an extra 1 before the extension in image urls inside posts that are imported. What I did to fix this issue was use the Search and Replace plugin.

You have to be careful with this search and replace plugin because it has the capability to mass modify posts or anything else in your WordPress DB.  PHPMYAdmin query can also do what Search and Replace does but it is easier to use search and replace. I fired up the Search and Replace plugin, and all I did was checkmark “Search in Content” and then typed “1.jpg” inside the Search For field.  Then in the Replace with field I just typed .jpg.  After I did this I have  that noticed all JPEG photos that were broken inside posts have started showing up again.  I did the same thing for PNG, GIF’s and JPEGs and I got all my images back.

 
Search for
 
Replaced with

Other posts you should consider reading:

  • Apple released its latest iOS update to improve battery life and fix Touch ID issues being faced by iPhone 5s users. The complete iOS 7.1.1 changelog included: Fur ...
  • Here are some great Pandora alternatives if you are bored with Pandora and want to try out something new. Songza Songza is a great Pandora alternative and has j ...
  •   Turtle Rock Studios have unleashed four new hunter characters for Evolve today! Check them out below. Hyde Hyde is the new Assault class character, who ...
  • The best way to move money. No percentages. No hidden fees. Just 25¢ per transaction or free for transactions $10 or less. Dwolla is a United States-only e-commerce ...
  • If you're a console gamer and you have yet to jump on the Diablo III bandwagon, August 19th is the date to keep an eye on -- Blizzard announced today that it plans ...
  • Following the leak and subsequent reveal of Battlefield Hardline yesterday, the gameplay trailer of Battlefield Hardline has now been uncovered. In it you'll see th ...
  • Here are 2 great websites that allow you to recharge your cell phone service.  In my case I had a very difficult time recharging from the official Lyca Mobile website ...
  • Link to a specific point in a track so you can have your friend listen to your favorite part Similar to Youtube, you can link to a specific point in a track.  Right ...
  • Alienware laptop beeps when I turn it on. This article will provide the Beep Codes Table. This will apply when the computer is not posting or not giving image ...
  • In the past we all remember the LG made smartphones that were behind in quality and performance compared to Apple and Samsung phones, but things have now changed. ...