wp_img_tag_add_width_and_height_attr


wp_img_tag_add_width_and_height_attr ( $image, $context, $attachment_id )

Parameters:
  • (string) image The HTML `img` tag where the attribute should be added.
  • (string) context Additional context to pass to the filters.
  • (int) attachment_id Image attachment ID.
Returns:
  • (string) Converted 'img' element with 'width' and 'height' attributes added.
Defined at:

Description

Adds `width` and `height` attributes to an `img` HTML tag.

Related Functions

wp_img_tag_add_loading_attr, wp_img_tag_add_decoding_attr, wp_img_tag_add_srcset_and_sizes_attr, wp_iframe_tag_add_loading_attr, wp_img_tag_add_loading_optimization_attrs

Top Google Results

User discussions

wpseek mobile