-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images: Adding images to a post doesn't also attach it #1586
Comments
Should be fixed as of #1967 |
I tested publishing a photo post in Gutenberg 1.4.0 and the photo wasn't attached. Video of my publishing flow and other details here: https://test.wordpress.com/2017/10/13/image-posting-flow-gutenberg/ |
To clarify, this appears to be specific to drag-and-drop upload, which uses its own implementation to upload to the WordPress REST API. Uploading using the media library within Gutenberg will correctly attach the image to the post. |
The naive answer would be to inject gutenberg/utils/mediaupload.js Lines 74 to 77 in 2328828
But...
For drag-and-drop, that happens in the image block transform: gutenberg/blocks/library/image/index.js Lines 69 to 81 in 2328828
This ties into #2473, where blocks (let alone transforms) don't currently have easy access to post state. |
Is the "Attached to this post" idea going to be deprecated with Gutenberg? I'm asking this because some custom post types I've seen out there (Portfolio, Events, Ads, etc...) use this to just display images attached to posts. |
Please can someone give this bug the attention it deserves? It's a backward compatibility issue. |
I’d just like to point out that this problem occurs when using the Upload button in the Image block. |
@joemcgill Did you get anywhere on this or can I help out with it? |
@danielbachhuber haven’t looked at it yet. Was hoping to have a go at it soon, but feel free. |
This can cause theme issues.
The text was updated successfully, but these errors were encountered: