WordPress at a glance
function is not described

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

  • See: wp_image_add_srcset_and_sizes()

Changelog

Since 4.4.0 Introduced.
Deprecated 5.5.0

Code of wp_make_content_images_responsive() WP 5.7

<?php
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 );
}