presets:
- name: mobile
width: 300
![Using preset mobile]({property_name.src})
images:
- name: property_name
image: $lib/images/planet.webp
preset: mobile
{
"format": "webp",
"width": 300,
"height": 171,
"space": "srgb",
"channels": 3,
"depth": "uchar",
"isProgressive": false,
"hasProfile": false,
"hasAlpha": false,
"aspect": 1.75,
"allowUpscale": false,
"src": "/_app/immutable/assets/planet.osnj-UV8.webp"
}
This example works like all others with the difference that we’re using a preconfigured image definition defined in mdsvex.config.js providing the settings for the remarkImagetools plugin. All properties of these presets can be overridden within the frontmatter which always takes precedence.