Modern Images
将图片转换为 WebP、AVIF 等现代格式,支持响应式 srcset、磁盘缓存和 LCP 预加载。
插件
Modern Images
将图片转换为 WebP、AVIF 等现代格式,支持响应式 srcset、磁盘缓存和 LCP 预加载。
将图片转换为 WebP、AVIF 等现代格式,支持响应式 srcset、磁盘缓存和 LCP 预加载。
安装
从 npm 安装该软件包:
npm install emdash-plugin-modern-images
在 Astro 配置中注册该插件:
import { modernImagesPlugin } from "emdash-plugin-modern-images";
export default defineConfig({
integrations: [
emdash({
plugins: [modernImagesPlugin()],
}),
],
});
详细信息
- 最新版本: 1.3.0
- 许可证: MIT
- 发布者: Adriano Amalfi
- 要求: EmDash
^0.12.0 - 源代码仓库: https://github.com/adrianoamalfi/emdash-plugin-modern-images
- npm 包: emdash-plugin-modern-images