Skip to content

不支持的图片格式

UnsupportedImageFormat:从 IMAGE_PATH 收到不支持的格式 FORMAT。目前我们的图片服务仅支持 SUPPORTED_FORMATS.JOIN(’,’)。

¥UnsupportedImageFormat: Received unsupported format FORMAT from IMAGE_PATH. Currently only SUPPORTED_FORMATS.JOIN(’, ’) are supported by our image services.

¥What went wrong?

内置图片服务目前不支持优化所有图片格式。

¥The built-in image services do not currently support optimizing all image formats.

对于不支持的格式(例如 GIF),你可以直接使用 img 标签:

¥For unsupported formats such as GIFs, you may be able to use an img tag directly:

---
import rocket from '../assets/images/rocket.gif';
---
<img src={rocket.src} width={rocket.width} height={rocket.height} alt="A rocketship in space." />
Astro 中文网 - 粤ICP备13048890号