• Resolved mmk175

    (@mmk175)


    Hi there,

    So I have an issue with my images. I can’t upload any more to my site. It’s saying it’s a size issue but I think it’s because i have so many on my site. nearly 10k.

    My main issue. (the reason for this thread) is provided below.

    Because of what I mentioned above I decided to delete all un attached images on my site. I was a bit sceptical of this and I thankfully backed everything up.

    Note: To delete unattached images I was clicking media, filter unattached, select all images on the pages (250 images) and delete.

    Check this video.

    So what you’ll see here is that product 18146 no longer has a featured image. This is what alerted me that the deletes where not being done correctly.

    After this I restored the images. You then see the image is back on the product.

    Then you’ll notice the images is picked as a featured image but within the media section it’s tagged as unattached.

    Why has this happened and is there any easy way to fix this?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • In short: use the backup.

    Long answer: you have broken your project through your actions. The assignment of objects (product, post, page, etc.) to a file in the Media Library is unfortunately very incomplete for historical reasons. You can only assign a maximum of one object to a file in the database. If you now use the image in several places (e.g. on the post and product), WordPress doesn’t know about it. For this reason, many plugins that are used to assign files do not even save this assignment. It just doesn’t make much sense for them.

    Deleting all unassigned files now leads to exactly what you have experienced. You have deleted a file that was actually used somewhere. But WordPress didn’nt know about it. As a result, it is gone there. Only using the backup can help to fix this.

    As far as I know, the revision of the media library is part of the plan for the Gutenberg Editor. I don’t know the schedule for this, but I hope that something will be changed in this context.

    Thread Starter mmk175

    (@mmk175)

    Thanks @threadi

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.