Skip to content

Commit 8af584f

Browse files
committed
Upgrade 11ty-img library, change image quality settings
1 parent 4c270c1 commit 8af584f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.eleventy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ function imageShortcode(src, attributes = {}, maxWidth = 2636) {
2626
urlPath: '/images/',
2727
outputDir: './dist/images/',
2828
sharpAvifOptions: {
29-
quality: 60,
30-
effort: 9,
29+
quality: 55,
30+
effort: 5,
3131
chromaSubsampling: '4:2:0',
3232
},
3333
sharpWebpOptions: {
34-
quality: 70,
34+
quality: 65,
3535
alphaQuality: 77,
3636
chromaSubsampling: '4:2:0',
3737
},

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Create components at least for the parts of the UI that appear in multiple place
5353

5454
It is recommended that you will keep your components inside the `src/components/` folder. This starter kit allows you to keep your markup, styles, and JavaScript code for a component in one folder and then to use them in multiple places. Please, see the `src/components/` folder for examples. Notice how different types of components are arranged. Also, It is not absolutely mandatory to include Nunjucks or JS code for a component if you feel that it doesn't make too much sense. For example, when the markup is quite simple or when a component doesn't have JS logic.
5555

56+
## Image Quality Settings
57+
58+
You can change image compression settings for avif, webp, jpeg in .eleventy.js file
59+
5660
## TypeScript
5761

5862
This boilerplate supports TypeScript, however it is completely optional to use it for development. For TypeScript support, it was decided to use JSDoc notation ([officially supported TypeScript syntax](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html)) because it does not make you to write .ts files with TS syntax, with this approach you can continue to write .js files with JS syntax and JSDoc notation for TypeScript support. Also, in this case you can easily disable TypeScript if you do not need it at some point of your development process. (for example, to speed up the development or if you have new developers on a project that are not familiar with TypeScript)

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"license": "ISC",
3333
"dependencies": {
3434
"@11ty/eleventy": "^1.0.0",
35-
"@11ty/eleventy-cache-assets": "^2.1.0",
36-
"@11ty/eleventy-img": "^0.8.2",
35+
"@11ty/eleventy-img": "^2.0.1",
3736
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.6",
3837
"@babel/core": "^7.13.1",
3938
"@babel/plugin-proposal-class-properties": "^7.13.0",

0 commit comments

Comments
 (0)