@tryghost/image-transform 1.1.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/transform.js +3 -1
- package/package.json +4 -4
package/lib/transform.js
CHANGED
|
@@ -33,6 +33,7 @@ const shouldResizeFileExtension = ext => !['.ico', '.svg', '.svgz'].includes(ext
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Can we output animation (prevents outputting animated JPGs that are just all the pages listed under each other)
|
|
36
|
+
* Sharp doesn't support AVIF image sequences yet (animation)
|
|
36
37
|
* @param {keyof import('sharp').FormatEnum} format the extension to check, EXCLUDING the leading dot
|
|
37
38
|
*/
|
|
38
39
|
const doesFormatSupportAnimation = format => ['webp', 'gif'].includes(format);
|
|
@@ -47,7 +48,8 @@ const canTransformToFormat = format => [
|
|
|
47
48
|
'jpeg',
|
|
48
49
|
'jpg',
|
|
49
50
|
'png',
|
|
50
|
-
'webp'
|
|
51
|
+
'webp',
|
|
52
|
+
'avif'
|
|
51
53
|
].includes(format);
|
|
52
54
|
|
|
53
55
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/image-transform",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"repository": "https://github.com/TryGhost/
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"repository": "https://github.com/TryGhost/SDK/tree/main/packages/image-transform",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"c8": "7.
|
|
22
|
+
"c8": "7.12.0",
|
|
23
23
|
"mocha": "10.0.0",
|
|
24
24
|
"should": "13.2.3",
|
|
25
25
|
"sinon": "14.0.0"
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"optionalDependencies": {
|
|
33
33
|
"sharp": "^0.30.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "9251588cb81347205c5dab850636bba4c86fe58d"
|
|
36
36
|
}
|