mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
resources: Fix 2 image file cache key issues
* Always include the content hash in the cache key for unprocessed images. * Always include the image config hash in the cache key. This is also a major cleanup/simplification of the implementation in this area. Note that this, unfortunately, forces new hashes/filenames for generated images. Fixes #13273 Fixes #13272
This commit is contained in:
parent
8897113666
commit
1f5a15aba0
38 changed files with 342 additions and 233 deletions
|
@ -42,6 +42,6 @@ func TestImageResizeWebP(t *testing.T) {
|
|||
resized, err := image.Resize("123x")
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(image.MediaType(), qt.Equals, media.Builtin.WEBPType)
|
||||
c.Assert(resized.RelPermalink(), qt.Equals, "/a/sunrise_hu544374262273649331.webp")
|
||||
c.Assert(resized.RelPermalink(), qt.Equals, "/a/sunrise_hu_a1deb893888915d9.webp")
|
||||
c.Assert(resized.Width(), qt.Equals, 123)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue