Modern Images

將圖片轉換為 WebP、AVIF 等現代格式,支援響應式 srcset、磁碟快取和 LCP 預載入。

外掛

Modern Images

將圖片轉換為 WebP、AVIF 等現代格式,支援響應式 srcset、磁碟快取和 LCP 預載入。

  • 分類: 媒體
  • 狀態: 可用
  • 版本: 1.3.0
  • 價格: 未知
  • 來源: npm 套件
  • 安裝方式: npm 原生整合
  • 核實日期: 2026-11-01

將圖片轉換為 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()],
    }),
  ],
});

詳細資訊