View Source Bonfire.Files.ResponsiveImage (Bonfire v0.9.10-classic-beta.169)
Resizes images at compile time (when possible) or runtime:
use Bonfire.Files.ResponsiveImage
~H(<img src={compile_src("input.jpg", 300)} />)
or
~H(<img srcset={compile_srcset("input.jpg", [300, 600, 900])} src={...} sizes="50vw" />)
or for paths only known at runtime:
~H(<img src={src(my_image, 300)} />)
or
~H(<img srcset={srcset(my_image, [300, 600, 900])} src={...} sizes="50vw" />)