We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e148243 commit ed0820fCopy full SHA for ed0820f
packages/payload/src/index.ts
@@ -429,6 +429,16 @@ export class BasePayload<TGeneratedTypes extends GeneratedTypes> {
429
this.email = consoleEmailAdapter({ payload: this })
430
}
431
432
+ // Warn if image resizing is enabled but sharp is not installed
433
+ if (
434
+ !this.config.sharp &&
435
+ this.config.collections.some((c) => c.upload.imageSizes || c.upload.formatOptions)
436
+ ) {
437
+ this.logger.warn(
438
+ `Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config.`,
439
+ )
440
+ }
441
+
442
this.sendEmail = this.email['sendEmail']
443
444
serverInitTelemetry(this)
0 commit comments