File: wp-includes/media.php
-
functionwp_add_crossorigin_attributes()
Adds crossorigin=”anonymous” to relevant tags in the given HTML string.
-
functionwp_get_chromium_major_version()
Returns the major Chrome/Chromium version from the current request’s User-Agent.
-
Enables cross-origin isolation in the block editor.
-
Sends the Document-Isolation-Policy header for cross-origin isolation.
-
Checks whether client-side media processing is enabled.
-
Filters whether client-side media processing is enabled.
-
Sets a global JS variable to indicate that client-side media processing is enabled.
-
functionwp_get_image_encode_quality()
Determines the encode quality WordPress would use for an image.
-
Determines the output format for the image editor.
-
Filters the attachment ID to allow short-circuit the function.
-
functionwp_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.
-
Filters whether auto-sizes for lazy loaded images is enabled.
-
Checks whether the given ‘sizes’ attribute includes the ‘auto’ keyword as the first item in the list.
-
Enqueues a CSS rule to fix potential visual issues with images using `sizes=auto`.
-
functionwp_get_avif_info()
Extracts meta information about an AVIF file: width, height, bit depth, and number of channels.
-
Filters whether to short-circuit loading optimization attributes.
-
Filters the header-specific contexts.
-
Filters the loading optimization attributes.
-
functionwp_high_priority_element_flag()
Accesses a flag that indicates if an element is a possible candidate for `fetchpriority=’high’`.
-
Gets loading optimization attributes.
-
Determines whether to add `fetchpriority=’high’` to loading attributes.
-
Filters the minimum square-pixels threshold for an image to be eligible as the high-priority image.
-
Adds optimization attributes to an `img` HTML tag.
-
Filters the context in which wp_get_attachment_image() is used.
-
Filters the `decoding` attribute value to add to an image. Default ‘async’.
-
Filters an img tag within the content for a given context.
-
functionwp_omit_loading_attr_threshold()
Gets the threshold for how many of the first content media elements to not lazy-load.
-
Filters the threshold for how many of the first content media elements to not lazy-load.
-
Increases an internal content media count variable.
-
Filters the image editor output format mapping.