WPDev.one
Core Function
View Source on Trac ↗

wp_img_tag_add_auto_sizes()

wp_img_tag_add_auto_sizes( string $image )

Adds 'auto' to the sizes attribute to the image, if the image is lazy loaded and does not already include it.

Parameters 1 required

Name / Type Description
$image
string

The image tag markup being filtered.

Required

Return Value

(string)
The filtered image tag markup.

Function Information

Since Version
6.7.0
Source File
wp-includes/media.php
Advertisement