File tree Expand file tree Collapse file tree 7 files changed +14
-43
lines changed
Expand file tree Collapse file tree 7 files changed +14
-43
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ require (
2222 github.com/bep/overlayfs v0.10.0
2323 github.com/bep/simplecobra v0.6.1
2424 github.com/bep/tmc v0.5.1
25+ github.com/bep/webptemp v0.0.0-20251202110834-92f833957f2b
2526 github.com/bits-and-blooms/bitset v1.24.4
2627 github.com/cespare/xxhash/v2 v2.3.0
2728 github.com/clbanning/mxj/v2 v2.7.0
Original file line number Diff line number Diff line change @@ -178,6 +178,8 @@ github.com/bep/simplecobra v0.6.1 h1:ORBAC5CSar99/NPZ5fCthCx/uvlm7ry58wwDsZ23a20
178178github.com/bep/simplecobra v0.6.1 /go.mod h1:hmtjyHv6xwD637ScIRP++0NKkR5szrHuMw5BxMUH66s =
179179github.com/bep/tmc v0.5.1 h1:CsQnSC6MsomH64gw0cT5f+EwQDcvZz4AazKunFwTpuI =
180180github.com/bep/tmc v0.5.1 /go.mod h1:tGYHN8fS85aJPhDLgXETVKp+PR382OvFi2+q2GkGsq0 =
181+ github.com/bep/webptemp v0.0.0-20251202110834-92f833957f2b h1:yy1aEC9FSn35GsninCuHIEiXXh2dbwc579NVgXVLUkA =
182+ github.com/bep/webptemp v0.0.0-20251202110834-92f833957f2b /go.mod h1:v75l/Bf01VyaXGbNjpxF96GD/pgdp6v9fkRCfdMtQrQ =
181183github.com/bep/workers v1.0.0 h1:U+H8YmEaBCEaFZBst7GcRVEoqeRC9dzH2dWOwGmOchg =
182184github.com/bep/workers v1.0.0 /go.mod h1:7kIESOB86HfR2379pwoMWNy8B50D7r99fRLUyPSNyCs =
183185github.com/bits-and-blooms/bitset v1.24.4 h1:95H15Og1clikBrKr/DuzMXkQzECs1M6hhoGXLwLQOZE =
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import (
4242 "github.com/gohugoio/hugo/resources/images"
4343
4444 // Blind import for image.Decode
45- _ "golang.org/x/image/webp "
45+ _ "github.com/bep/webptemp "
4646)
4747
4848var (
Original file line number Diff line number Diff line change 1111// See the License for the specific language governing permissions and
1212// limitations under the License.
1313
14- //go:build extended
15-
1614package resources_test
1715
1816import (
Original file line number Diff line number Diff line change 1111// See the License for the specific language governing permissions and
1212// limitations under the License.
1313
14- //go:build extended
15-
1614package webp
1715
1816import (
1917 "image"
2018 "io"
2119
22- "github.com/bep/gowebp/libwebp"
20+ webp "github.com/bep/webptemp"
21+
2322 "github.com/bep/gowebp/libwebp/webpoptions"
2423)
2524
2625// Encode writes the Image m to w in Webp format with the given
2726// options.
2827func Encode (w io.Writer , m image.Image , o webpoptions.EncodingOptions ) error {
29- return libwebp .Encode (w , m , o )
28+ oo := webp.Options {
29+ Lossless : false ,
30+ Quality : o .Quality ,
31+ Method : 4 ,
32+ Exact : false ,
33+ }
34+ return webp .Encode (w , m , oo )
3035}
3136
3237// Supports returns whether webp encoding is supported in this build.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import (
3535 _ "image/png"
3636
3737 // Import webp codec
38- _ "golang.org/x/image/webp "
38+ _ "github.com/bep/webptemp "
3939
4040 "github.com/gohugoio/hugo/deps"
4141 "github.com/spf13/afero"
You can’t perform that action at this time.
0 commit comments