astro-accelerator 7.1.24 → 7.1.26
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/package.json +2 -2
- package/public/css/{main.7.1.19.css → main.7.1.26.css} +1 -0
- package/src/themes/accelerator/utilities/img.mjs +3 -2
- /package/public/css/{main.7.1.20.css → main.7.1.25.css} +0 -0
- /package/public/css/{vars.7.1.19.css → vars.7.1.25.css} +0 -0
- /package/public/css/{vars.7.1.20.css → vars.7.1.26.css} +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.1.
|
|
2
|
+
"version": "7.1.26",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -98,4 +98,4 @@
|
|
|
98
98
|
"zod@<=3.22.2": ">=3.22.3"
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
}
|
|
@@ -159,17 +159,18 @@ for (const file of filesToProcess) {
|
|
|
159
159
|
await createDestinationFolder(resizeDestination);
|
|
160
160
|
|
|
161
161
|
const metadata = await sharp(source).metadata();
|
|
162
|
+
const avifQuality = 80;
|
|
162
163
|
|
|
163
164
|
if (metadata.width > size[key]) {
|
|
164
165
|
// Only resize if the image is larger than the target size
|
|
165
166
|
sharp(source)
|
|
166
167
|
.resize(size[key], null)
|
|
167
|
-
.avif({ quality:
|
|
168
|
+
.avif({ quality: avifQuality })
|
|
168
169
|
.toFile(resizeDestination + '.avif');
|
|
169
170
|
} else {
|
|
170
171
|
// Don't resize as it's smaller than target size
|
|
171
172
|
sharp(source)
|
|
172
|
-
.avif({ quality:
|
|
173
|
+
.avif({ quality: avifQuality })
|
|
173
174
|
.toFile(resizeDestination + '.avif');
|
|
174
175
|
}
|
|
175
176
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|