fix: ENABLE_CLOUDFLARE_IMAGE
All checks were successful
Deployment / wordpress (push) Successful in 5s
Deployment / nuxt (push) Successful in 53s

This commit is contained in:
2026-01-30 14:35:21 -05:00
parent ba8d8e00a8
commit 9c3dceef84

View File

@@ -11,8 +11,7 @@ if (!wpUrl) {
} }
const wpDomain = new URL(wpUrl).hostname; const wpDomain = new URL(wpUrl).hostname;
const isDev = process.env.NODE_ENV !== "production"; const enableCloudflareImage = Boolean(process.env.ENABLE_CLOUDFLARE_IMAGE);
const isWranglerDev = process.env.WRANGLER_ENV === "dev";
// https://nuxt.com/docs/api/configuration/nuxt-config // https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({ export default defineNuxtConfig({
@@ -103,7 +102,7 @@ export default defineNuxtConfig({
}, },
image: { image: {
provider: isDev || isWranglerDev ? "none" : "cloudflare", provider: enableCloudflareImage ? "cloudflare" : "none",
cloudflare: { baseURL: `${siteUrl}/` }, cloudflare: { baseURL: `${siteUrl}/` },
domains: [wpDomain], domains: [wpDomain],
format: ["avif", "webp"], format: ["avif", "webp"],