This repository has been archived on 2025-12-24. You can view files and clone it, but cannot push or open issues or pull requests.
site-template/packages/api.md
2025-03-07 14:59:06 +01:00

55 lines
1.2 KiB
Markdown

components->Img -> renderImg -> getImage(sizes, format ...) -> element
getImage -> getProcessedImage(args[0] : src:local path)
args[0]
{
src: "https://assets.osr-plastic.org//products/sheetpress/cassandra-edczmax-rc2/media/gallery/perspective.jpg",
type: "Img",
sizes: "(min-width: 800px) 800px, 800vw",
format: "avif",
breakpoints: undefined,
placeholder: "blurred",
artDirectives: [
],
fallbackFormat: "avif",
includeSourceFormat: false,
formatOptions: {
jpg: {
quality: 80,
},
png: {
quality: 80,
},
webp: {
quality: 50,
},
},
transformConfigs: {
},
}
->
{
uuid: "B16DBD24",
images: [
{
sources: [
{
src: "/_astro/perspective@1320w.e183f84c.avif",
format: "avif",
srcset: "/_astro/perspective@320w.3435f7a3.avif 320w, /_astro/perspective@653w.e53b07bb.avif 653w, /_astro/perspective@920w.a7628e27.avif 920w, /_astro/perspective@1120w.90dfde67.avif 1120w, /_astro/perspective@1253w.084f9de3.avif 1253w, /_astro/perspective@1320w.e183f84c.avif 1320w",
},
],
sizes: {
width: 1320,
height: 1980,
},
fallback: "data:image/avif;base64,
imagesizes: "(min-width: 800px) 800px, 800vw",
},
],
}