@codin/cwc-picture

Web component for displaying images

Usage no npm install needed!

<script type="module">
  import codinCwcPicture from 'https://cdn.skypack.dev/@codin/cwc-picture';
</script>

README

Picture element

Simple web component for displaying images. Lazy loading on intersection and strategy for wrapping

see demo Codin web components

example

<cwc-picture cover>
 <source media="(min-width: 400px)" srcset="./high-res.jpg">
 <source srcset="./low-res.jpg">
</cwc-picture>