wp_img_tag_add_auto_sizes


wp_img_tag_add_auto_sizes ( $image )

Parameters:
  • (string) image The image tag markup being filtered.
Returns:
  • (string) The filtered image tag markup.
Defined at:

Description

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

Related Functions

wp_img_tag_add_srcset_and_sizes_attr, wp_image_add_srcset_and_sizes, wp_img_tag_add_loading_attr, wp_get_additional_image_sizes, wp_img_tag_add_loading_optimization_attrs

Top Google Results

User discussions

wpseek mobile