public static function get_image_fields( $field, $attachment_id, $sub_field = false ) {
		$size = apply_filters( Filter::IMAGE, false, $field, $sub_field );

		if ( ! $size ) {
			return $attachment_id;
		}

		$src = wp_get_attachment_image_src( $attachment_id, $size );

		if ( ! $src ) {
			return $attachment_id;
		}

		return [
			'src' 		=> $src[0],
			'width'		=> $src[1],
			'height'	=> $src[2],
			'alt'		=> get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ),
		];
	}
public static function get_image_fields( $field, $attachment_id, $sub_field = false ) {
		$size = apply_filters( Filter::IMAGE, false, $field, $sub_field );

		if ( ! $size ) {
			return $attachment_id;
		}

		$src = wp_get_attachment_image_src( $attachment_id, $size );

		if ( ! $src ) {
			return $attachment_id;
		}

		return [
			'src' 		=> $src[0],
			'width'		=> $src[1],
			'height'	=> $src[2],
			'alt'		=> get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ),
		];
	}
public static function get_image_fields ( $ field , $ attachment_id , $ sub_field = false ) { $ size = apply_filters ( Filter :: IMAGE , false , $ field , $ sub_field ) ; if ( ! $ size ) { return $ attachment_id ; } $ src = wp_get_attachment_image_src ( $ attachment_id , $ size ) ; if ( ! $ src ) { return $ attachment_id ; } return [ 'src' => $ src [ 0 ] , 'width' => $ src [ 1 ] , 'height' => $ src [ 2 ] , 'alt' => get_post_meta ( $ attachment_id , '_wp_attachment_image_alt' , true ) , ] ; }
Get image fields.

@param string $field			Field
@param int	 $attachment_id	The image id.
@param bool   $sub_field		Sub field (only if it's a repeater)
@return array
Get image fields .