Gutenberg and get_attached_media
Describe the bug
Uploading images into Gutenberg does not attach them to the post, so you can't use get_attached_media to get all of the images in a post.
To Reproduce Steps to reproduce the behavior:
- Create a post
- Upload one or more images into the post
- In the loop, use the
get_attached_media()function, or useget_children()to find child media
Expected behavior
Without Gutenberg, get_attached_media() will return all images attached to the post.
Additional context Gutenberg 3.6.2
Uploading videos into Gutenberg has the same issue. Following.
Thanks for reporting! I would like to consolidate this issue to #8748 because I think fixing that one will also solve this issue as well as they are very similar. Let me know if there's a good reason for leaving this one separate though!
Yep, sounds like the two issues have the same root problem. Thanks!