{{# @name Picture @desc The picture component. A responsive imageset in a picture element. See `resources/views/components/_figure.antlers.html` for an example on how to use this. @param* image An image URL. @param* sizes The sizes attribute. Something like `(min-width: 768px) 55vw, 90vw` for example. @param aspect_ratio Pass in an aspect ratio to crop the image. Example: `16/9`. @param sources Array of art direction sources with media queries. Each source should have `image`, `media`, and optionally `aspect_ratio` and `sizes`. @param preload Boolean. Whether to inject a preload link for LCP optimization. @param class Add optional CSS classes. @param cover Boolean. Whether the image should cover the parent. Uses the focus position. @param bg String. Sets a background color for transparent images. @param blur Integer. Adds a blur effect to the image. Use values between 0 and 100. @param brightness String. Adjusts the image brightness. Use values between -100 and +100, where 0 represents no change. @param contrast String. Adjusts the image contrast. Use values between -100 and +100, where 0 represents no change. @param filter String. Applies a filter effect to the image. Accepts `greyscale` or `sepia`. @param flip String. Flips the image. Accepts `v`, `h` and `both`. @param gamma Float. Adjusts the image gamma. Use values between 0.1 and 9.99. @param orient String. Rotates the image. Accepts `auto`, `0`, `90`, `180` or `270`. @param sharpen Integer. Sharpen the image. Use values between 0 and 100. @param pixelate Integer. Applies a pixelation effect to the image. Use values between 0 and 1000. @param lazy Boolean. Whether the image should be natively lazy loaded. @param quality int Set image quality. Defaults to 85. @deprecated skip_ratio_steps Use `sources` with media queries instead. @deprecated srcset_from Use `sources` with media queries instead. @deprecated aspect_ratio with `large:` syntax Use `sources` with media queries for breakpoint-specific ratios. #}} {{ if srcset_from || skip_ratio_steps || (aspect_ratio | contains('large:')) }} {{# Legacy Antlers rendering for deprecated parameters #}} {{ partial:statamic-peak-tools::components/picture_legacy :image="image" :sizes="sizes" :aspect_ratio="aspect_ratio" :skip_ratio_steps="skip_ratio_steps" :srcset_from="srcset_from" :class="class" :cover="cover" :lazy="lazy" :fetchpriority="fetchpriority" :quality="quality" :bg="bg" :blur="blur" :brightness="brightness" :contrast="contrast" :filter="filter" :flip="flip" :gamma="gamma" :orient="orient" :pixelate="pixelate" :sharpen="sharpen" }} {{ else }} {{ picture :image="image" :sizes="sizes" :aspect_ratio="aspect_ratio" :sources="sources" :preload="preload" :class="class" :cover="cover" :lazy="lazy" :fetchpriority="fetchpriority" :quality="quality" :bg="bg" :blur="blur" :brightness="brightness" :contrast="contrast" :filter="filter" :flip="flip" :gamma="gamma" :orient="orient" :pixelate="pixelate" :sharpen="sharpen" }} {{ /if }}