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.


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


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



Since 4.4.0 Introduced.
Deprecated 5.5.0

Code of wp_make_content_images_responsive() WP 6.0

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 );