You have to convert attachment variable to JSON object using toJSON() . Then you can its property.
use
attachment = frame.state().get('selection').first().toJSON();
instead of
attachment = frame.state().get('selection').first();
Related Posts:
- Update media library files after upload via FTP
- Image dimensions same as image size
- Way to display media library in frontend
- Disable edit option in Media library
- Rebuild the entire WordPress uploads folder
- See List View – or Image titles- of Media Library when “Add Media” button is used
- How to upload media to a specific folder without a plugin in WordPress?
- media library not showing thumbnails after deleting full image
- When I insert media from Library into a post, can I then safely delete that media?
- Images missing from the media folder
- Direct media library upload saving in wrong month date folder in custom theme
- add file name column to media library to sort by
- Media Library empty after server migration
- Prevent WordPress from generating medium_large 768px size of image uploads?
- Cleanup uploads folder, Media Library db structure
- Rendering the uploaded file in a wp.media object
- WordPress Media Manager 3.5 – default link to
- Linking a PDF as a downloadable document
- Failed to import media from a local wordpress site to a live one
- Is is possible to crop an image after uploading
- Rename “Add Media” Button To “Add Images”
- Filter what image sizes get generated
- Change default tab of media manager
- Is email post notify visitor on new media upload possible?
- How to set additional parameter in wp.media?
- get total number of images from media using xml-rpc
- Audio Playlist : How to bind events for “track change”, “track end”?
- How do I control video media display sizing with native wordpress player
- Failed media import
- Upload mobi and epub file in the MEDIA of WP
- Handle lots of images within the media uploader / selector
- FTP files directly to Media Library wp-content\uploads
- Uploading Media gives error “Missing a temporary folder.”
- Disable mouse image resizing in editor
- How to insert an Audio Player in a Post or Page?
- Proper way to change the path of uploads folder for existing WordPress site
- 3.5 Media Manager – callout in metaboxes
- Force WordPress, themes & plugins into using defined sizes
- Audio file’s length (duration) is missing from Attachment Details in Media Library [closed]
- Media Manager: refresh library after new selection
- WordPress Media Image Manager — Creating Lots and Lots of Odd Sized Images
- Large image size stuck on old value, even for new images
- Can I force all uploaded images to be reduced in quality?
- Cannot upload anything via wordpress
- Video uploaded with the native media uploader gives Error 404
- Audio Player for MP3 Files for WordPress
- How select multiple document as like media gallery
- Get Image from Media Library with the Title
- adding images column to admin edit columns not working for SVG
- It is possible to add custom media size in admin media edit?
- Limit number of images to upload in wp.media function
- Link to resized media file
- Allow Editor Role to Edit Media
- Error: Warning: strpos() in media.php
- Bulk image importing from folders
- Custom controller for video that is added from editor
- How to get media source of text editor in WordPress
- WordPress media file link with fancybox
- How to allow logged out users to upload media?
- Automatically attach image to post if they have the same title
- Editing image dimension – to edit the main image file
- Upload video in custom folder
- Force image crop size in media editor
- Media Library not showing images but still acknowledges existence
- Set Maximum Width for an uploaded image
- Too slow Image upload in WordPress Media Library as image number increases
- Use staging media files on development site in WordPress
- Getting a specific value out of array using get_attached_media
- WordPress 3.6 native player is not responsive?
- Thumbnail images chopped off but not cropped to exact dimensions
- Uploading a media item with the wp-json API to a specific path
- How to programatically toggle the media setting “Organize my uploads into month- and year-based folders”?
- Unable to add logo or header [closed]
- How to disable (and hide) the Media Library for certain users?
- Admin edit S3 Media file?
- Specific folder and no thumbnail generation for media_sideload_image
- Publish / unpublish media items in the media library
- Use media files from a different server just for one custom type
- Allow a specific user role I have created to only upload one image to his media library
- Pre-load images into a new users media gallery
- How to get all id_attachment with one loop?
- Media isn’t showing in WordPress library but is available in uploads folder
- Media Library not loading
- How do I get WordPress to create resizes of a supplied default image in a theme?
- Creating multiple instances of Media Uploader
- How to manually set an attachment in a post?
- Handle image file and save it to media
- TwentySeventeen $content_width not updated in admin
- Change behavior of the “ADD Media” buttom
- Disable wordpress gif compression?
- How to create different media uploader frames / filter library depending on a custom action
- Unable to delete images in Media Library
- cant able to upload media to my wordpress blog
- Don’t show avatars in media library
- Extra metadata for media items
- Change image in media library at specific time
- Import of 200+ sermons
- After import, oEmbeds non-functional until manual republish
- Cache of site on browser
- Add link to media files in backend and modify linked images in the frontend