Already uploaded medias are not always accessible

Hello,
I used local to set up a WordPress website and it works wonders except : the medias that I upload are not always accessible. Sometimes, my medias are all here for me to choose from when I open the “media vault”. Sometimes, I just face an empty space and am asked to upload pics that I have already loaded.

If suspect there are several media folders that were created and are not accessible through the same paths. If I search the Local web folder, I see my media is stored in Local Sites > Mysite > app > public > wp-contant > upload > 2025 > 05


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

The problem seems to be haphazard : sometimes I can access all my media, sometimes I can’t see them. I did not find a pattern.


System Details


Local Logs - Attached

local-logs.zip (923.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @hoteldiderot

You might try using a plugin like Media Sync to help sort this out:

This plugin allows you to examine all files within the uploads directory to determine which ones are present in the Media Library and which ones are just sitting there unused. You can then choose the files you want to import into the database, thereby including them in the Media Library.

1 Like

Thank you for the tip, but it does not solve my problem.
After using Media Sync :
When I look a the media library, I still have 217 items.
When I try to use it in a page, I still only see 178 items.
What am I doing wrong.

If you create a new, blank site and add media there do you run into any issues? Or is it just this specific site?

Are you using any image optimizers?

I tried with another (new, empty) website and it does not have the same problem…
The real one has an image optimizer the new (fake) one does not.

Okay well that helps narrow it down to an issue with this specific site at least. Maybe there is a conflict happening with the Image Optimizer. Could you try disabling that and maybe even all plugins to see if that helps?