If I had to guess: because images are Attachments, and Attachments are a Post-Type. Thus, in order to edit an image, which is an attachment, which is a post, requires the edit_post capability.
EDIT
Don’t you have your capability mapping array keys/values reversed?
e.g. you have 'edit_posts' => 'edit_listings'. Shouldn’t it instead be 'edit_listings' => 'edit_posts'?
Related Posts:
- Allow member to have access to custom post type only. Permission to only edit their own posts
- Allowing custom role access to custom post type in back end
- Restrict Contributors to view only their own custom post types?
- How to assign specific users the capability to edit specific pages / posts / custom post types
- Defining capabilities for custom post type
- Assign a Custom Role to a Custom Post?
- Creating custom user roles
- set_post_thumbnail_size in percent, not pixels?
- Can I make user role that can only access a certian content type?
- Custom post type Admin Page
- Create user role restricted to specific CPT
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- User roles – enable custom posts disable posts
- Add Capabilities to Custom Post Type after it has been created [duplicate]
- How to restrict specific post types from being read or added by specific user roles (eg. author)?
- Image size filtering in Media uploader according to custom post type
- Count all images of a certain post type
- Custom user role not working as expected
- Stopping WordPress from Auto Generating Image Files for Sizes
- Which User Role for Custom Post Type Menu – wp_nav
- Uploaded image not appearing in custom post type
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Custom Role can’t trash Custom Post Type
- Limit access to page depending on user level
- Why does current_user_can(‘edit_posts’) return true, but current_user_can(‘edit_post’, $post->ID) returns false?
- How to get category image custom post type taxonomy in wordpress?
- How to publish custom post type for custom role user and not “submit for review”?
- add_image_size for post type
- Registration and Custom Post Types – How to synchronize information?
- Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type
- Limit users by custom taxonomy and user roles
- Issue to get wp_get_attachment_image with cmb2
- How to rename image at uploading on specific plugin or post-type in WordPress
- Allow Administrator role access to custom capabilities [duplicate]
- How to enable a custom post type to custom user role in WordPress
- How to insert multiple images into a single post within a CPT
- List all images from a single post meta value
- How to restrict CPT post’s fronted view only for specific user roles?
- current_user_can() return FALSE but debugging says TRUE
- Display content based on a users login
- Hide editor while keeping add media button in custom post type
- Multiple featured sizes / images / excerpts
- Custom post types as sub menu pages and role capabilities issue
- Hiding posts by other users and non-logged in
- How to set individual capability of post type in individual category
- I want to create custom post in which user can share files like PDF & DOCx
- WooCommerce Customer Role Delete Custom Post Type
- Allow Contributor to edit but not update a published post
- Disable user from updating certain posts
- Access to CPT but not to ‘post’ post type
- Deny user access to edit post while allow him to edit custom post type
- Allow user to only access custom post type
- How to show featured image block in custom post type for Author?
- frontend image post uploader
- Adding custom image sizes and post types to a plugin or to a theme?
- How to handle large number of images in a post?
- How do you get the full size url of an attachment image
- How can i link a custom post type thumbnail to intermediate size
- Custom User role not working with custom post type
- Building Forums with Custom Post Types
- Role capabilities issue
- How do you output an unknown number of images in a custom post type with desired markup?
- copy images from custom field to another custom field
- Using Image Sizes for Custom Post Types outside the Loop
- link featured image to external link
- Prevent user from editing others posts
- Thumbnails Not Generating
- How do I “trash” a custom post type post while logged in as Admin
- How to fix the Post Preview Button (CPT & map_meta_cap)
- Restrict Custom Post Type per role in Dashboard
- Restrict access to custom post type based on its taxonomy terms
- Create relationship between custom post types and users
- How to only display all posts to a custom User Role?
- How can I add image sizes for a specific custom post type?
- Multiple useres editing specified content
- Change picture attachment meta of all occurrences of a picture
- How do you make a custom post type invisible for subscribers
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Capibilities of CPT WordPress
- How can I remove “Add new” button on custom post type
- Links Image in “Catalog” Page to Posts
- Capabilities and mapping required for a role to be able to edit other’s posts of a custom type, BUT only be able to edit their own blog posts
- Custom user roles
- Editor role isn’t seeing specific post type posts with only post_type parameter
- How do I set a specific size for my image?
- Weird capabilities / roles behavior
- Control what custom posts a user can see
- Working with gallery shortcode and get gallery images
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom taxonomy archive is visible to only subscibed users
- Image paths on custom post types getting /post_type/ added to path
- Retrieve post data via WPDB class
- Custom role, capabilities, and post type: preview button wrecks things
- Allow authors to create article image
- empty dashboard for custom role
- Front end post or photo or both
- set_post_thumbnail or media_sideload_image adds image multiple times in media library
- How to Create Grey Background for Product Images on Website Display but Retain White Background on Downloaded JPGs?
- Need some suggestions with Relationship fields and CPT/ACF
- How to fix post_tags not showing for a CPT in new post for a custom user role?