WPDev.one
Core Function
View Source on Trac ↗

wp_make_content_images_responsive()

wp_make_content_images_responsive( mixed $content )

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

Parameters 1 required

Name / Type Description
$content
string

The raw post content to be filtered.

Required

Return Value

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

Function Information

Since Version
4.4.0
Source File
wp-includes/deprecated.php
Advertisement