前言介紹
- 這款 WordPress 外掛「Squidge」是 2021-12-07 上架。
- 目前有 50 個安裝啟用數。
- 上一次更新是 2021-12-21,距離現在已有 1230 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
webp | image | lazy load | compression | image compression |
內容簡介
Squidge 是一款免費的 WordPress 外掛,專為開發人員打造,使用 jpegoptim、optipng、cwebp 和 libavif 壓縮和轉換圖片。它非常簡單易用,旨在增加 PSI,並提高排名。
為什麼要使用 Squidge?
在 WordPress 中進行圖片壓縮可能會耗費時間,讓人困惑,有時甚至不能正常運作。我們旨在通過要求開發人員在操作系統上安裝所需的套件,並讓 Squidge 為您進行繁重的工作,簡化這個過程。
免費使用
無限制的檔案大小
優化您的網站以提高排名
CLI 重新生成所有媒體檔案
輔助函數,可在範本中輸出圖片
使用原生的 cwebp 和 libavif 函式庫
Squidge 可以做什麼?
當使用者上傳檔案到 WordPress 時,Squidge 可以將圖片檔案壓縮並轉換。
使用 jpegoptim 壓縮 JPG 圖像
使用 optipng 壓縮 PNG 圖像
使用 cwebp 將 JPG 和 PNG 圖像轉換為 .webp 格式,並添加後綴,例如:image.jpg.webp
使用 libavif 將 JPG 和 PNG 圖像轉換為 .avif 格式,並添加後綴,例如:image.jpg.avif
圖片呈現
要在範本中呈現圖片,您可以設置 nginx 或 apache 規則以動態顯示圖片,或使用 squidge_image 輔助函數。這將動態檢查檔案系統中是否存在 .avif 或 .webp 檔案,並返回輸出。
輔助函數
/**
* Returns a
* (such as a JPG), the .avif file, the .webp file (if to exist on the file system).
*
* Appropriate
* Finally, the main be outputted with alt and title text.
*
* - If lazy is true, the data-src or data-srcset will be appended.
* - If a class is set, the class will be outputted on the
*
* @param $image_id
* @param string $class
* @param false $lazy
* @return string
*/
function squidge_image($image_id, $class = '', $lazy = false)
輸出範例
鳴謝
作者:Ainsley Clark
原文外掛簡介
Squidge is a FREE WordpPress Plugin built for developers in mind compressing and convert images using jpegoptim,
optipng, cwebp, and libavif. It’s extremley simple to use and is designed to increase PSI and boost rankings.
Why?
Image compression in WordPress can be costly, confusing and sometimes just simply don’t work. We have aimed to simplify
the process by requiring the developer to install the required package on the operating system and Squidge does the
hard work for you.
IT’S FREE
Unlimited file size, no limits.
Optimised for your site to rank.
CLI to regenerate all of your media files.
Helper functions to output images in templates.
Uses the native cwebp and libavif libraries.
What does Squidge do?
Squidge compresses and converts image files when the user has uploaded a file to WordPress.
Compresses JPG images using jpegoptim.
Compresses PNG images using optipng.
Converts JPG and PNG images to .webp files using cwebp with the appended extension e.g. image.jpg.webp.
Converts JPG and PNG images to .avif files using libavif with the appended extension e.g. image.jpg.avif.
Render Images
To render images in templates, you can either set up nginx or apache rules to serve images dynamically or used the
squidge_image helper function. This dynamically checks if an .avif or .webp file is available on the file system
and returns the output.
Function
/**
* Returns a
* (such as a JPG), the .avif file, the .webp file (if to exist on the file system).
*
* Appropriate
* Finally, the main be outputted with alt and title text.
*
* - If lazy is true, the data-src or data-srcset will be appended.
* - If a class is set, the class will be outputted on the
*
* @param $image_id
* @param string $class
* @param false $lazy
* @return string
*/
function squidge_image($image_id, $class = '', $lazy = false)
Output
Credits
Written by Ainsley Clark
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Squidge」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Smush Image Optimization – Optimize Images | Compress & Lazy Load Images | Convert WebP & AVIF | Image CDN 》Optimize images、啟用 lazy load、調整大小、壓縮以及改善 Google Page 速度,使用由 WPMU DEV 超級團隊齊心研發的強大 WordPress 圖片 Smusher,100% 免費...。
EWWW Image Optimizer 》你是否對緩慢的網站感到沮喪?超大的圖片讓你感到 "噁心"?讓 EWWW Image Optimizer 儘可能幫助你的網站加速,提高跳出率並增強 SEO。最重要的是,讓訪客感到...。
Converter for Media – Optimize images | Convert WebP & AVIF 》透過使用我們的圖片優化外掛,以 WebP 和 AVIF 圖片來展示,來加速您的網站。將標準 JPEG、PNG 和 GIF 格式的文件替換成 WebP 和 AVIF 格式,可以在不失去品...。
WebP Express 》ch means less bandwidth usage and faster page load times., Easy to use - with little effort, WordPress site admins can have their site serving auto...。
Modern Image Formats 》外掛介紹:此外掛可在 WordPress 應用程式中增加 WebP 支援,但僅針對新上傳的影像檔案轉換成 WebP 格式,現有檔案不會轉換。預設情況下,WebP 只會針對 JPEG...。
Cache Enabler 》Cache Enabler 是個簡單卻強大的 WordPress 快取外掛,使用起來簡單且只需要最小化的設定,最重要的是能夠幫助網站提升效能來達到更快的載入時間。它會將前端...。
Optimus – WordPress Image Optimizer 》WordPress圖片優化器, Optimus可自動降低已上傳媒體檔案的檔案大小。根據圖片和格式,可以減少高達70%的大小。每張圖片可以節省數千位元組,這些節省可以對博...。
QODE Optimizer 》總結:使用 QODE Optimizer 外掛可以快速且方便地提高網站轉換率和加快載入速度,壓縮、轉換、調整和完全優化網站圖像,操作簡單直觀。, , 問題與答案:, 1. ...。
AVIF, WebP Converter 》總結:CompressX 是一個免費的 WebP 和 AVIF 轉換與壓縮 WordPress 網站外掛程式。它可以幫助您將 JPG 和 PNG 圖像輕鬆轉換為 WebP 和 AVIF 格式,並對 WebP ...。
WP Enable WebP 》這是一個 WordPress 外掛程式,可以啟用 WebP 圖片上傳到媒體庫。, 同時,外掛會在 body 標籤上新增一個類別,以便使用 CSS 選擇器,方便設定背景圖片。, 例...。
ShortPixel Adaptive Images – WebP, AVIF, CDN, Image Optimization 》ShortPixel Adaptive Images 是一款易於使用的外掛程式,讓您能夠在一分鐘內解決任何圖像相關問題,並提高您的網站核心網頁要素。通常,圖像是網頁上最消耗資...。
Plus WebP or AVIF 》產生 WebP, , 在媒體庫加入圖片檔時,同時產生相對應的 WebP 檔案。, 透過 AJAX 批量製作網站上所有圖片的 WebP 檔案。, 在背景中製作網站上所有圖片的 WebP ...。
Images to WebP 》統計顯示,WebP 格式可以在不損失圖像質量的前提下減輕網頁一半以上的負載。, 將 PNG、JPG 和 GIF 圖像轉換為 WebP,加快您的網站速度,減少訪問者下載數據,...。
Allow Webp image 》通常 WordPress 不允許使用 ".webp" 格式的媒體檔案,導致上傳時出現錯誤。為了解決此錯誤,您需要安裝這個外掛。啟用外掛後,即可上傳 ".webp" 圖像檔案,加...。
Support WebP – Upload webp files in wordpress without hassle 》這個外掛可以讓你在 WordPress 媒體庫中上傳 WebP 格式的圖片,不受佈景主題限制,也就是說它與所有佈景主題都相容。, 查看外掛的 GitHub 存儲庫:Support We...。