Title: Media | Developer.WordPress.org

---

# @package: Media

 * function[wp_get_image_editor_output_format()](https://developer.wordpress.org/reference/functions/wp_get_image_editor_output_format/)
 * Determines the output format for the image editor.
 * Used by [5 functions](https://developer.wordpress.org/reference/functions/wp_get_image_editor_output_format/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_get_image_editor_output_format/#uses)
   | Source: [wp-includes/media.php:6337](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6337-L6367)
 * hook[pre_attachment_url_to_postid](https://developer.wordpress.org/reference/hooks/pre_attachment_url_to_postid/)
 * Filters the attachment ID to allow short-circuit the function.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/pre_attachment_url_to_postid/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/pre_attachment_url_to_postid/#uses)
   | Source: [wp-includes/media.php:5526](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5526-L5526)
 * function[wp_img_tag_add_auto_sizes()](https://developer.wordpress.org/reference/functions/wp_img_tag_add_auto_sizes/)
 * Adds ‘auto’ to the sizes attribute to the image, if the image is lazy loaded 
   and does not already include it.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_img_tag_add_auto_sizes/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/wp_img_tag_add_auto_sizes/#uses)
   | Source: [wp-includes/media.php:2016](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2016-L2066)
 * hook[wp_img_tag_add_auto_sizes](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_auto_sizes/)
 * Filters whether auto-sizes for lazy loaded images is enabled.
 * Used by [4 functions](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_auto_sizes/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_auto_sizes/#uses)
   | Source: [wp-includes/media.php:2024](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2024-L2024)
 * function[wp_sizes_attribute_includes_valid_auto()](https://developer.wordpress.org/reference/functions/wp_sizes_attribute_includes_valid_auto/)
 * Checks whether the given ‘sizes’ attribute includes the ‘auto’ keyword as the
   first item in the list.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/wp_sizes_attribute_includes_valid_auto/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/wp_sizes_attribute_includes_valid_auto/#uses)
   | Source: [wp-includes/media.php:2078](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2078-L2081)
 * function[wp_enqueue_img_auto_sizes_contain_css_fix()](https://developer.wordpress.org/reference/functions/wp_enqueue_img_auto_sizes_contain_css_fix/)
 * Enqueues a CSS rule to fix potential visual issues with images using `sizes=auto`.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/wp_enqueue_img_auto_sizes_contain_css_fix/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/wp_enqueue_img_auto_sizes_contain_css_fix/#uses)
   | Source: [wp-includes/media.php:2095](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2095-L2115)
 * function[wp_get_avif_info()](https://developer.wordpress.org/reference/functions/wp_get_avif_info/)
 * Extracts meta information about an AVIF file: width, height, bit depth, and number
   of channels.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_get_avif_info/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_get_avif_info/#uses)
   | Source: [wp-includes/media.php:5862](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5862-L5887)
 * hook[pre_wp_get_loading_optimization_attributes](https://developer.wordpress.org/reference/hooks/pre_wp_get_loading_optimization_attributes/)
 * Filters whether to short-circuit loading optimization attributes.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/pre_wp_get_loading_optimization_attributes/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/pre_wp_get_loading_optimization_attributes/#uses)
   | Source: [wp-includes/media.php:5996](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5996-L5996)
 * hook[wp_loading_optimization_force_header_contexts](https://developer.wordpress.org/reference/hooks/wp_loading_optimization_force_header_contexts/)
 * Filters the header-specific contexts.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_loading_optimization_force_header_contexts/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_loading_optimization_force_header_contexts/#uses)
   | Source: [wp-includes/media.php:6116](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6116-L6116)
 * hook[wp_get_loading_optimization_attributes](https://developer.wordpress.org/reference/hooks/wp_get_loading_optimization_attributes/)
 * Filters the loading optimization attributes.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_get_loading_optimization_attributes/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_get_loading_optimization_attributes/#uses)
   | Source: [wp-includes/media.php:6196](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6196-L6196)
 * function[wp_high_priority_element_flag()](https://developer.wordpress.org/reference/functions/wp_high_priority_element_flag/)
 * Accesses a flag that indicates if an element is a possible candidate for `fetchpriority
   =’high’`.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_high_priority_element_flag/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/wp_high_priority_element_flag/#uses)
   | Source: [wp-includes/media.php:6317](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6317-L6325)
 * function[wp_get_loading_optimization_attributes()](https://developer.wordpress.org/reference/functions/wp_get_loading_optimization_attributes/)
 * Gets loading optimization attributes.
 * Used by [6 functions](https://developer.wordpress.org/reference/functions/wp_get_loading_optimization_attributes/#used-by)
   | Uses [13 functions](https://developer.wordpress.org/reference/functions/wp_get_loading_optimization_attributes/#uses)
   | Source: [wp-includes/media.php:5980](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5980-L6197)
 * function[wp_maybe_add_fetchpriority_high_attr()](https://developer.wordpress.org/reference/functions/wp_maybe_add_fetchpriority_high_attr/)
 * Determines whether to add `fetchpriority=’high’` to loading attributes.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_maybe_add_fetchpriority_high_attr/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/wp_maybe_add_fetchpriority_high_attr/#uses)
   | Source: [wp-includes/media.php:6261](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6261-L6306)
 * hook[wp_min_priority_img_pixels](https://developer.wordpress.org/reference/hooks/wp_min_priority_img_pixels/)
 * Filters the minimum square-pixels threshold for an image to be eligible as the
   high-priority image.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/wp_min_priority_img_pixels/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_min_priority_img_pixels/#uses)
   | Source: [wp-includes/media.php:6298](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6298-L6298)
 * function[wp_img_tag_add_loading_optimization_attrs()](https://developer.wordpress.org/reference/functions/wp_img_tag_add_loading_optimization_attrs/)
 * Adds optimization attributes to an `img` HTML tag.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_img_tag_add_loading_optimization_attrs/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/wp_img_tag_add_loading_optimization_attrs/#uses)
   | Source: [wp-includes/media.php:2126](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2126-L2259)
 * hook[wp_get_attachment_image_context](https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_context/)
 * Filters the context in which wp_get_attachment_image() is used.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_context/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_context/#uses)
   | Source: [wp-includes/media.php:1095](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L1095-L1095)
 * hook[wp_img_tag_add_decoding_attr](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_decoding_attr/)
 * Filters the `decoding` attribute value to add to an image. Default `async`.
 * Used by [2 functions](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_decoding_attr/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_img_tag_add_decoding_attr/#uses)
   | Source: [wp-includes/media.php:2172](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2172-L2177)
 * hook[wp_content_img_tag](https://developer.wordpress.org/reference/hooks/wp_content_img_tag/)
 * Filters an img tag within the content for a given context.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_content_img_tag/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_content_img_tag/#uses)
   | Source: [wp-includes/media.php:1971](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L1971-L1971)
 * function[wp_omit_loading_attr_threshold()](https://developer.wordpress.org/reference/functions/wp_omit_loading_attr_threshold/)
 * Gets the threshold for how many of the first content media elements to not lazy-
   load.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/wp_omit_loading_attr_threshold/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_omit_loading_attr_threshold/#uses)
   | Source: [wp-includes/media.php:6211](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6211-L6231)
 * hook[wp_omit_loading_attr_threshold](https://developer.wordpress.org/reference/hooks/wp_omit_loading_attr_threshold/)
 * Filters the threshold for how many of the first content media elements to not
   lazy-load.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_omit_loading_attr_threshold/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_omit_loading_attr_threshold/#uses)
   | Source: [wp-includes/media.php:6227](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6227-L6227)
 * function[wp_increase_content_media_count()](https://developer.wordpress.org/reference/functions/wp_increase_content_media_count/)
 * Increases an internal content media count variable.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/wp_increase_content_media_count/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/wp_increase_content_media_count/#uses)
   | Source: [wp-includes/media.php:6242](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6242-L6248)
 * hook[image_editor_output_format](https://developer.wordpress.org/reference/hooks/image_editor_output_format/)
 * Filters the image editor output format mapping.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/image_editor_output_format/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/image_editor_output_format/#uses)
   | Source: [wp-includes/media.php:6366](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L6366-L6366)
 * function[wp_get_webp_info()](https://developer.wordpress.org/reference/functions/wp_get_webp_info/)
 * Extracts meta information about a WebP file: width, height, and type.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/wp_get_webp_info/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/wp_get_webp_info/#uses)
   | Source: [wp-includes/media.php:5904](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5904-L5956)
 * hook[media_library_infinite_scrolling](https://developer.wordpress.org/reference/hooks/media_library_infinite_scrolling/)
 * Filters whether the Media Library grid has infinite scrolling. Default `false`.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/media_library_infinite_scrolling/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/media_library_infinite_scrolling/#uses)
   | Source: [wp-includes/media.php:4914](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L4914-L4914)
 * function[get_adjacent_image_link()](https://developer.wordpress.org/reference/functions/get_adjacent_image_link/)
 * Gets the next or previous image link that has the same post parent.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/get_adjacent_image_link/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/get_adjacent_image_link/#uses)
   | Source: [wp-includes/media.php:3940](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L3940-L3996)
 * function[get_next_image_link()](https://developer.wordpress.org/reference/functions/get_next_image_link/)
 * Gets the next image link that has the same post parent.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/get_next_image_link/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_next_image_link/#uses)
   | Source: [wp-includes/media.php:3910](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L3910-L3912)
 * function[get_previous_image_link()](https://developer.wordpress.org/reference/functions/get_previous_image_link/)
 * Gets the previous image link that has the same post parent.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/get_previous_image_link/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/get_previous_image_link/#uses)
   | Source: [wp-includes/media.php:3881](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L3881-L3883)
 * function[wp_getimagesize()](https://developer.wordpress.org/reference/functions/wp_getimagesize/)
 * Allows PHP’s getimagesize() to be debuggable when necessary.
 * Used by [14 functions](https://developer.wordpress.org/reference/functions/wp_getimagesize/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/wp_getimagesize/#uses)
   | Source: [wp-includes/media.php:5730](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L5730-L5845)
 * function[wp_iframe_tag_add_loading_attr()](https://developer.wordpress.org/reference/functions/wp_iframe_tag_add_loading_attr/)
 * Adds `loading` attribute to an `iframe` HTML tag.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/wp_iframe_tag_add_loading_attr/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/wp_iframe_tag_add_loading_attr/#uses)
   | Source: [wp-includes/media.php:2356](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2356-L2409)
 * hook[wp_iframe_tag_add_loading_attr](https://developer.wordpress.org/reference/hooks/wp_iframe_tag_add_loading_attr/)
 * Filters the `loading` attribute value to add to an iframe. Default `lazy`.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_iframe_tag_add_loading_attr/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_iframe_tag_add_loading_attr/#uses)
   | Source: [wp-includes/media.php:2398](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/media.php#L2398-L2398)

1 [2](https://developer.wordpress.org/reference/package/media/page/2/?output_format=md)
[3](https://developer.wordpress.org/reference/package/media/page/3/?output_format=md)…
[6](https://developer.wordpress.org/reference/package/media/page/6/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/package/media/page/2/?output_format=md)