WP_REST_Attachments_Controller::edit_media_item()wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php | Applies edits to a media item and creates a new attachment record.
|
wp_get_original_image_path()wp-includes/post.php | Retrieves the path to an uploaded image file.
|
wp_get_original_image_url()wp-includes/post.php | Retrieves the URL to an original attachment image.
|
wp_get_missing_image_subsizes()wp-admin/includes/image.php | Compare the existing image sub-sizes (as saved in the attachment meta) to the currently registered image sub-sizes, and return the difference.
|
wp_update_image_subsizes()wp-admin/includes/image.php | If any of the currently registered image sub-sizes are missing, create them and update the image meta data.
|
WP_Widget_Media_Image::render_media()wp-includes/widgets/class-wp-widget-media-image.php | Render the media on the frontend.
|
WP_Customize_Manager::import_theme_starter_content()wp-includes/class-wp-customize-manager.php | Imports theme starter content into the customized state.
|
WP_REST_Attachments_Controller::prepare_item_for_response()wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php | Prepares a single attachment output for response.
|
wp_restore_image()wp-admin/includes/image-edit.php | Restores the metadata for a given attachment.
|
wp_save_image()wp-admin/includes/image-edit.php | Saves image to post, along with enqueued changes in $_REQUEST['history'] .
|
wp_image_editor()wp-admin/includes/image-edit.php | Loads the WP image-editing interface.
|
edit_form_image_editor()wp-admin/includes/media.php | Displays the image and editor in the post editor
|
attachment_submitbox_metadata()wp-admin/includes/media.php | Displays non-editable attachment metadata in the publish meta box.
|
get_media_item()wp-admin/includes/media.php | Retrieves HTML form for modifying the image attachment.
|
edit_post()wp-admin/includes/post.php | Updates an existing post with values provided in $_POST .
|
wp_ajax_save_attachment()wp-admin/includes/ajax-actions.php | Handles updating attachment attributes via AJAX.
|
attachment_id3_data_meta_box()wp-admin/includes/meta-boxes.php | Displays fields for ID3 data.
|
Custom_Image_Header::step_2()wp-admin/includes/class-custom-image-header.php | Displays second step of custom header image page.
|
get_uploaded_header_images()wp-includes/theme.php | Gets the header images uploaded for the active theme.
|
prepend_attachment()wp-includes/post-template.php | Wraps attachment in paragraph tag before content.
|
wp_delete_attachment()wp-includes/post.php | Trashes or deletes an attachment.
|
wp_get_attachment_thumb_file()wp-includes/deprecated.php | Retrieves thumbnail for an attachment.
|
wp_xmlrpc_server::_prepare_media_item()wp-includes/class-wp-xmlrpc-server.php | Prepares media item data for return in an XML-RPC object.
|
Example return value
Note that, since WordPress 6.0, return value includes filesize. This is for can be utilized so that image file size ca be retrieved without having to call php function filesize.
See Media: storing file size as part of metadata.
Example for video format:
NOTE that when calling wp_get_attachment_metadata() , the ARRAY index returned from ‘file’ is the file path relative to wp-content/uploads.
If you want to get url of domain to link up, you can use snippet below