Media is the post type (post_type="attachment"), so most operations are done with wp post command.
By default, wp post manage blog posts (post_type="post"),
therefore by fetching post IDs you must add --post_type=attachment indicating the type of posts.
And to update media meta you should use wp post meta update <id> <key> <value>
Your entire command could look like this:
wp post list --date="2022-02-24" --format=ids --post_type=attachment | xargs -n 1 -I % wp post meta update % _wp_attachment_image_alt "{some meta value}"
Related Posts:
- Change the default-view of Media Library in 3.5?
- Get All Images in Media Gallery?
- List of available events for wp.media
- How can I bulk delete media and attachments using WP-CLI?
- WordPress 3.5 attachment_fields_to_edit and media_send_to_editor
- Bind event on Media gallery elements WordPress
- How to upload an image in the plugin’s options page
- WP 3.5 media uploader API set selected item
- Add file name column to media library
- Remove the columns in media library
- How to save attachment data?
- Using WordPress as a document library
- Register an additional image size for only some images in my media library
- How to enlarge thickbox media library iframe?
- How to modify Media Library images
- How do I remove the entire Media section from the main WordPress navigation without just hiding it?
- Change default screen option value for media items per page (in media library)
- Making the Add Media Link URL into a checkbox
- Add tab on new media library
- Is there any way to add images to the Media Library through a path on the server?
- Show ids of displayed media library items
- How can I use the TinyMCE editor for the description field on a Media item?
- How does the media library determine if a PDF file has preview images?
- resize from small images to large
- Function to get image from media library
- Bulk Import files on Media Library from CSV
- How can I make the Uploaded field editable for Media Library?
- Display only my own files/images in media library
- “Insert Into Post” For Custom Button
- Display image file size in media library
- remove_menu_page breaks “Add media”
- is there any hooks or action to fire function of insert into post in media library?
- Why do I sometimes get an attachment id string instead of a url from an image’s guid field in the post table?
- How to change compression of WordPress uploads including original image
- Organize media uploads in folders – I have a physical access to (my) server
- wordpress not generate thumnails for mp4 videos
- Sorting Media Library by Author Name
- Media gallery: remove “insert into post” button keeping “Insert gallery” button
- change video icons to selected thumbnail?
- How do I migrate blog post images from one domain to a new one?
- Manipulate an image before saving or after to the media libary
- wp_get_attachment_image_src returns the wrong image
- Get the largest image based on a thumbnail in a URL
- Intersept image upload and generate retina image from source
- Image file names with a space in them
- Crop image with full width
- Change Media Library thumbnails for non-image files to include the post title instead of the filename?
- attachment media-template data model (data.size.url)
- the_post_thumbnail(“size”) returns same image for all sizes except thumbnail
- How do you alter the default WordPress thumbnail?
- Media Library, hook on delete user action
- Create a User Role with permissions to only upload files to the media library?
- Adding Alt Tag Column to Media Library List
- High CPU load when loading images in media library
- How to modify the attachment info text on gallery tab or media page?
- Add media button always inserts media on the next wp_editor instance when created dynamically
- Is it Helpful to transfer all media library to another host? [closed]
- Media library on another server?
- Is there a way to determine if the media-iframe is visible?
- WordPress lowers image quality
- image not found in media library
- Windows Live Writer inconsistent with Media Library
- Is there a way to programmatically pass a category to the Media Library selector?
- Media Library http to https
- Media Library Cleanup A Thought Exercise
- Want to sell images online on wordpress but slow image loading issues
- How to limit the amount of images uploaded to the media library within post.php
- Change thumbnail size for Media Library
- Adding Facebook Open Graph Code does not work for Media Library Attachment Pages
- Update WP Media Library image unattended
- Media library corrupted after upgrading to 4.9.6
- Uploads folder only showing files up to the letter “P”
- query that alternates text posts with images from media gallery
- Can multiple sites under one folder structure share media directories?
- WordPress Media Delete Logs
- WordPress not using edited image
- How to display the date a directory folder on ftp was modified
- Moving wp from a server to another, with different administrator
- How to access media library?
- Create gallery doesn’t show uploaded images
- Media Library not showing images when adding to Posts (but retrieving image info via ajax)
- WordPress 3.5 Media Manager – Change loaded image Size [duplicate]
- Change the default-view of Media Library in 3.5?
- How use Videos from another directory?
- bulk deleting empty items in the media library
- Media Manager 3.5 custom options
- Remove (Unattached) Attach from “Uploaded to” in Media Library
- Uploading pictures to the Media Library: “Specified file failed upload test.”
- WordPress Media Library
- Create media library feed
- Broken image links in media library after restore
- Store images and videos category wise and fetch them in json format
- Add Filename Colum to Media Library
- create a user’s owned folder on user registration
- 2 or more WordPress instances (Live vs Staging Test site) –> access 1 uploads.domain.com — images holder – see images in Media Library
- How to bulk edit taxonomies for attachments
- Block non logged in users from accessing the media library
- Remove Edit Attachment Button in WordPress Mediathek -> see Screenshot
- Unable to upload media files: Maximum upload file size: 0 B [closed]
- I’m planning to offload my WordPress Media Library to a CDN? Would you recommend it, and why (or why not)?