diff --git a/app.yaml b/app.yaml index 2c1f5c5..8cb289d 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ # [START app_yaml] runtime: nodejs20 -instance_class: F4 +# instance_class: F4 automatic_scaling: max_concurrent_requests: 50 target_throughput_utilization: 0.85 @@ -13,4 +13,5 @@ automatic_scaling: env_variables: GCP_PROJECT_ID: "286428615502" aws_access_key_id: "AKIAUKSW7EP4G66JAYXE" + JCD_IMG_V3_TO_V4: true # [EMD app_yaml] \ No newline at end of file diff --git a/package.json b/package.json index 3b1668f..1c2f638 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": ".eslintrc.js", "scripts": { - "start": "node --optimize_for_size --max_old_space_size=460 index.js", + "start": "node --optimize_for_size --max_old_space_size=230 index.js", "build": "rm -rf ./dist && tsc", "dev": "nodemon -e ts,json,js --watch \"./dist/**/*\" --exec \"npm start\"", "db:create": "node dist/db/create-db.js", diff --git a/src/models/img-sz.ts b/src/models/img-sz.ts index 87a27fe..f7f3c98 100644 --- a/src/models/img-sz.ts +++ b/src/models/img-sz.ts @@ -7,6 +7,7 @@ const ImgSzs = [ 'md', 'lg', 'xl', + 'xxl', ] as const; export type ImgSz = typeof ImgSzs[number]; export const DEFAULT_IMG_SZ: ImgSz = 'lg'; @@ -29,16 +30,19 @@ export function imgSzFromDimensions(opts: { return DEFAULT_IMG_SZ; } let dimension = Math.max(opts.width ?? 0, opts.height ?? 0); - if(dimension > 1920) { + if(dimension > 2100) { + return 'xxl'; + } + if(dimension > 1600) { return 'xl'; } - if(dimension > 1366) { + if(dimension > 1200) { return 'lg'; } - if(dimension > 854) { + if(dimension > 800) { return 'md'; } - if(dimension > 666) { + if(dimension > 500) { return 'sm'; } return 'xs';