gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Gutenberg and get_attached_media

Open morganisok opened this issue 8 years ago • 3 comments

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:

  1. Create a post
  2. Upload one or more images into the post
  3. In the loop, use the get_attached_media() function, or use get_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

morganisok avatar Aug 30 '18 23:08 morganisok

Uploading videos into Gutenberg has the same issue. Following.

mindgraffiti avatar Aug 31 '18 13:08 mindgraffiti

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!

designsimply avatar Aug 31 '18 21:08 designsimply

Yep, sounds like the two issues have the same root problem. Thanks!

morganisok avatar Aug 31 '18 21:08 morganisok