mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Fix image format detection for upper case extensions, e.g. JPG
This regression was introduced in 0.56.0. Fixes #6137
This commit is contained in:
@@ -152,6 +152,16 @@ func TestImageTransformLongFilename(t *testing.T) {
|
||||
assert.Equal("/a/_hu59e56ffff1bc1d8d122b1403d34e039f_90587_c876768085288f41211f768147ba2647.jpg", resized.RelPermalink())
|
||||
}
|
||||
|
||||
// Issue 6137
|
||||
func TestImageTransformUppercaseExt(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
image := fetchImage(assert, "sunrise.JPG")
|
||||
resized, err := image.Resize("200x")
|
||||
assert.NoError(err)
|
||||
assert.NotNil(resized)
|
||||
assert.Equal(200, resized.Width())
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5730
|
||||
func TestImagePermalinkPublishOrder(t *testing.T) {
|
||||
for _, checkOriginalFirst := range []bool{true, false} {
|
||||
|
Reference in New Issue
Block a user