Warning: This function has been deprecated. Use wp_image_add_srcset_and_sizes() instead.

wp_make_content_images_responsive( string $content )

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


Description Description

See also See also


Top ↑

Parameters Parameters

$content

(string) (Required) The raw post content to be filtered.


Top ↑

Return Return

(string) Converted content with 'srcset' and 'sizes' attributes added to images.


Top ↑

Source Source

File: wp-includes/deprecated.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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.5.0 This function has been deprecated. Use wp_image_add_srcset_and_sizes() instead.
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.