Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/242.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何为Wordpress Gutenberg图像块输出添加宽度和高度?_Php_Wordpress_Lazy Loading_Wordpress Gutenberg_Gutenberg Blocks - Fatal编程技术网

Php 如何为Wordpress Gutenberg图像块输出添加宽度和高度?

Php 如何为Wordpress Gutenberg图像块输出添加宽度和高度?,php,wordpress,lazy-loading,wordpress-gutenberg,gutenberg-blocks,Php,Wordpress,Lazy Loading,Wordpress Gutenberg,Gutenberg Blocks,默认古腾堡图像块i HTML输出没有height=“xxx”和width=“xxx”参数: <div class="wp-block-image"> <figure class="aligncenter size-blog-width"> <img src="https://domain.tld/wp-content/uploads/img-640x136.jpg" alt="alt" class="wp-image-83" srcset="https://doma

默认古腾堡图像块i HTML输出没有height=“xxx”和width=“xxx”参数:

<div class="wp-block-image">
<figure class="aligncenter size-blog-width">
<img src="https://domain.tld/wp-content/uploads/img-640x136.jpg" alt="alt" class="wp-image-83" srcset="https://domain.tld/wp-content/uploads/img-640x136.jpg 640w, https://domain.tld/wp-content/uploads/img-300x64.jpg 300w, https://domain.tld/wp-content/uploads/img-768x163.jpg 768w, https://domain.tld/wp-content/uploads/img.jpg 814w" sizes="(max-width: 640px) 100vw, 640px">
<figcaption>something</figcaption>
</figure>
</div>

某物
我怎样才能强迫WordPress/Gutenberg添加它们

我需要他们(特别是高度)正确地使图像占位符在惰性加载插件