vite-plugin-svelte-image Svelte Themes

Vite Plugin Svelte Image

Svelte Image - Plugin for vite to auto optimize images.

Available query parameters

layout = "constrained" || "fixed" || "fullWidth"

width = number

height = number

aspectRatio = number

placeholder = blurred || dominantColor || tracedSvg

formats = "auto" | "webp" | "jpeg" | "png" | "avif"

grayscale = boolean

duotone = boolean

rotate = boolean

trim = number

cropFocus = "cover" | "entropy" | "attention"

imageFit = "cover" | "contain" | "fill" | "inside" | "outside"

sizes = string

quality = number

outputPixelDensities = number[]

breakpoints = number[]

License

This package is distributed under the MIT License. You can do what you want with this code.

Top categories

Loading Svelte Themes