From e4608409d0cfe37328ad465c64ea50b1cd2fc1ad Mon Sep 17 00:00:00 2001 From: macdonst Date: Mon, 22 Jul 2024 16:32:01 -0400 Subject: [PATCH] Add Enhance Image Signed-off-by: macdonst --- app.arc | 1 + app/elements/enhance-image.mjs | 2 ++ app/preflight.mjs | 13 +++++++++++++ package.json | 1 + 4 files changed, 17 insertions(+) create mode 100644 app/elements/enhance-image.mjs create mode 100644 app/preflight.mjs diff --git a/app.arc b/app.arc index 5ada442..cbf69aa 100644 --- a/app.arc +++ b/app.arc @@ -7,6 +7,7 @@ prune true @plugins architect/plugin-bundles +enhance/arc-image-plugin enhance/arc-plugin-enhance enhance/arc-plugin-styles create-post-metadata diff --git a/app/elements/enhance-image.mjs b/app/elements/enhance-image.mjs new file mode 100644 index 0000000..4eb4ea1 --- /dev/null +++ b/app/elements/enhance-image.mjs @@ -0,0 +1,2 @@ +import EnhanceImage from '@enhance/image' +export default EnhanceImage diff --git a/app/preflight.mjs b/app/preflight.mjs new file mode 100644 index 0000000..9d7b58e --- /dev/null +++ b/app/preflight.mjs @@ -0,0 +1,13 @@ +export default async function Preflight () { + return { + plugins: { + '@enhance/image': { + transform: { + widths: [ 2000, 1500, 1000, 750, 500 ], + quality: 75, + format: 'webp', + } + } + } + } +} diff --git a/package.json b/package.json index 9376874..56ce4da 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@docsearch/js": "^3.3.0", "@enhance/arc-plugin-enhance": "^11.0.1", "@enhance/arc-plugin-styles": "^5.0.6", + "@enhance/image": "^1.0.0", "@mux/mux-player": "^2.7.0", "arcdown": "^2.3.0", "feed": "^4.2.2",