內容簡介
讓 Timber 外掛與 Jetpack 的 Photon 服務相容。安裝後,所有的 TimberImages 使用 PhotonCDN 和圖片裁切功能(例如:resize)。
Photon 是一個針對 Jetpack 接入的 WordPress 網站進行圖片加速與修改的服務。經轉換後的圖片會被自動緩存並從 WordPress.com 的 CDN 中提供服務。Photon 是 Jetpack 外掛中的一部分,並且完全免費。
它的功用是什麼?
在搭載 Jetpack Photon 的 Timber,擴展了當前的 TimberImage 類別並使用 Photon 進行圖片提供服務和裁切功能:
{{post.thumbnail.src}} 返回一個 Photon URL
{{post.thumbnail.src|resize(100)}} 返回一個 Photon URL
{{post.thumbnail.src|resize(100,200)}} 返回一個 Photon URL
Photon URL 的格式如下:
//i0.wp.com/www.slimndap.com/wp-content/uploads/2014/05/slimndap.png
必須要搭載由 Jared Nova 開發的 Timber 外掛和已啟動 Photon 服務的 Jetpack 外掛。
歡迎貢獻
在 GitHub 上提交拉取請求
作者
Jeroen Schmit, Slim & Dapper
外掛標籤
開發者團隊
原文外掛簡介
Make the Timber plugin work with Jetpack’s Photon. Once installed, all TimberImages use Photon as a CDN and for image manipulation (eg. resize).
Photon is an image acceleration and modification service for Jetpack-connected WordPress sites. Converted images are cached automatically and served from the WordPress.com CDN. Photon is part of the Jetpack plugin and completely free.
What does it do?
Timber with Jetpack Photon extends the current TimberImage class to use Photon to serve and manipulate your images:
{{post.thumbnail.src}} returns a Photon URL
{{post.thumbnail.src|resize(100)}} returns a Photon URL
{{post.thumbnail.src|resize(100,200)}} returns a Photon URL
A Photon URL looks like this:
//i0.wp.com/www.slimndap.com/wp-content/uploads/2014/05/slimndap.png
Requires the Timber plugin by Jared Nova and the Jetpack plugin with Photon activated.
Contributors welcome
Submit a pull request on Github
Author
Jeroen Schmit, Slim & Dapper
