Documentation
¶
Overview ¶
Package image is the media worker's image producer (libvips, CGO): the Image presets' private WebP files, the Zip presets, the public presets' fixed names, editor views, and the kinds' default public images. A Processor runs one media.ProcessJob: it redoes stale or pending outputs, records them in one manifest edit per pass, and keeps public/ in step.
Index ¶
Constants ¶
const Recipe = "webp-1"
Recipe versions the image producer: a change re-renders every image output.
Variables ¶
This section is empty.
Functions ¶
func PublishDefaults ¶ added in v0.62.0
PublishDefaults renders every public preset's Default (a file in its kind's Defaults) to the kind's _default item at every width, where the access agent serves a missing public name from. An unchanged default is not written again. It returns the keys written, for a CDN purge. Apps run it from their deploy step.
Types ¶
type Config ¶
type Config struct {
Store media.Store
Manifests *media.Manifests
// Purge relays overwritten or deleted public keys to the host's
// Hooks.PurgePublic (media.HostQueue.Purge); optional.
Purge func(ctx context.Context, keys []string) error
Workers int // uploads decoded at once; default 2
// MaxPixels bounds a decoded source, all frames of an animation
// together (default 100 MP); MaxFrames and MaxAnimationSeconds bound
// animations (defaults 1000 and 60).
MaxPixels int
MaxFrames int
MaxAnimationSeconds float64
TempDir string // zip scratch; default os.TempDir()
}
Config configures a Processor.