wp_make_content_images_responsive()WP 4.4.0

Deprecated from version 5.5.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Filters 'img' elements in post content to add 'srcset' and 'sizes' attributes.

No Hooks.

Return

String. Converted content with 'srcset' and 'sizes' attributes added to images.

Usage

wp_make_content_images_responsive( $content );
$content(string) (required)
The raw post content to be filtered.

Notes

Changelog

Since 4.4.0 Introduced.
Deprecated since 5.5.0

wp_make_content_images_responsive() code WP 6.5.2

function wp_make_content_images_responsive( $content ) {
	_deprecated_function( __FUNCTION__, '5.5.0', 'wp_filter_content_tags()' );

	// This will also add the `loading` attribute to `img` tags, if enabled.
	return wp_filter_content_tags( $content );
}