Opened 4 years ago
Closed 2 years ago
#53159 closed defect (bug) (wontfix)
Media aren't attached if uploaded from libray and are attached if uploaded from post
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.7.1 |
Component: | Media | Keywords: | reporter-feedback close |
Focuses: | Cc: |
Description
It seems that medias keep unattached if they are uploaded from library before adding them to post or custom_post. If they are uploaded from post or custom_post, it's working fine.
Here are the reprocedures:
- Working one: Upload from post:
- 1. create a post
- 2. click to add featured image
- 3. upload an image and attach
- 4. Publish post
- 5. Go to library and filter unattached
- Result: the uploaded image don't show up
- Issued one: Upload first:
- 1. go to library and upload an image
- 2. create a post
- 3. click to add featured image
- 4. Publish post
- 5. Go to library and filter unattached
- Result: the uploaded image shows up
The same behaviour has been found while attaching images to Woocommerce products with CSV import. It's been tested with Automattic support and they have the same issue on their side.
Change History (4)
#2
@
4 years ago
Hi @desrosj,
I guess I'm in block editor, but I don't really use it because I installed a page builder. I discovered this by adding a feature image from backend (see screenshot).https://drive.google.com/file/d/1oL7sCsOv2zNd3o221pWMSEwxuDkcCCZv/view?usp=sharing
The same occurs while adding product image in Woocommerce where there is no block editor (only classic editor).
I understand that originally, the attached status just signified that an image was uploaded to a post, but it is far better to know whether or not an image is not attached and so unnecessary in filesystem (a lot less images to deal with when you have hundreds). Maybe there is a media library improvement scheduled...
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
#4
@
2 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Hi ellimstom! Thanks for making this issue. After review in the Media component meeting we found that this is the intended behavior of the Media Library. Being that this data is very much pointed as a 1 to 1 relationship, it would be undesired to overwrite that data every time the same image is used as feature. Also, folks may be using this attached property in specific ways being that it is a more underutilized function and changing the behavior to update that attached property based on featured image will likely be unpredictable.
I'm going to close this ticket as this suggestion has been closed prior for similar reasons.
Hi @ellimstom,
Welcome to Trac!
Can you clarify whether you are using the block editor or the Classic Editor? I am able to reproduce the behavior, but only using the block editor.
If you are indeed using the block editor, this will need to be reported as an issue upstream in the Gutenberg GitHub repository. I'm adding a suggestion to
close
this ticket asreported-upstream
pending that confirmation.I did some digging to see if this was intentional, and I couldn't find anything. I'm going to link several related items though:
It's worth noting that originally, the attached status just signified that an image was uploaded to a post, so
post_thumbnails
and attachments embedded in posts can inconsistently be attached/unattached in ways that make technical sense, but the attached/unattached relationship has grown over time and has become quite confusing and inconsistent.This behavior was initially introduced into the Classic Editor in [22843].