Images showing as blank after upload directory change

  • Unknown's avatar

     Hi! I need help with my WordPress.com site. All my existing images are now showing as blank/broken, though I can see the files are still in my Media Library.

    This started happening after I made changes to upload directory settings. New image uploads seem to work, but all my previous images (hundreds of them) are no longer displaying on my site or in the media library preview.

    My site is on the Business plan. The images appear to still exist as files, but WordPress can’t seem to find them to display them properly.

    Can someone help restore the correct file paths so my existing images display again?

    Thanks!

  • Unknown's avatar

    The “broken” images are occurring because your site’s database is still looking for files in the old location (or URL structure), while your new settings are directing traffic elsewhere; essentially, the “map” to your files has changed, but the files themselves haven’t moved to match it. Since you are on the Business plan, you have two powerful options to fix this: first, if you want to restore the site to how it was, navigate to the hidden settings page at yourdomain.com/wp-admin/options.php and look for the upload_path and upload_url_path fields—clearing these so they are blank usually resets WordPress to the default folder where your original images reside. If you are committed to the new directory structure, you must update the database to match; install the Better Search Replace plugin, search for the old image path string, and replace it with your new directory path (always run a “Dry Run” first to be safe).

  • Unknown's avatar

    Thank you James! I believe changing the upload path with solve my issue however, clearing out the fields do not seem to work. I believe the photos were under a different upload path but can’t seem to remember what the original pathway was. Is there any way to find out what the original pathway is? Thanks again.

  • Unknown's avatar

    Never mind, This has been resolved. Thank you!!

  • Unknown's avatar

    When uploading new images, I get the error message “Unable to create directory img/2026/01. Is its parent directory writable by the server?” I am able to make changes to upload directory settings and uploading new images seem to work, but all my previous images are no longer displaying on my site or in the media library preview. Is there a work around to this issue?

Log in or create an account to reply