Media / foldkit-media/sharp

inspectorSharp

function · packages/media/src/sharp/index.ts:89

function inspectorSharp(options?: {
  readonly maxPixels?: number
}): Layer.Layer<Inspector>

The Inspector on a Node server: an original's size and alpha from sharp, and a thumbnail for its ThumbHash. Alpha is whether any pixel is not opaque (stats().isOpaque), not whether the format has an alpha channel, so an opaque PNG still gets a placeholder. An original above maxPixels is a 413.