缺少图片尺寸
缺少
IMAGE_URL
的宽度和高度属性。使用远程图片时,两个尺寸都是必需的,以避免累积布局偏移 (CLS)。¥Missing width and height attributes for
IMAGE_URL
. When using remote images, both dimensions are required in order to avoid cumulative layout shift (CLS).
什么地方出了错?
Section titled 什么地方出了错?¥What went wrong?
对于远程图片,无法从原始文件中自动推断出 width
和 height
。为避免累积布局偏移 (CLS),请指定这两个属性,或将 inferSize
设置为 true
以获取远程图片的原始尺寸。
¥For remote images, width
and height
cannot automatically be inferred from the original file. To avoid cumulative layout shift (CLS), either specify these two properties, or set inferSize
to true
to fetch a remote image’s original dimensions.
如果你的图片位于 src
文件夹内,你可能想导入它。参见 导入指南了解更多信息。
¥If your image is inside your src
folder, you probably meant to import it instead. See the Imports guide for more information.
也可以看看:
¥See Also:
Error Reference