react-optimized-image icon indicating copy to clipboard operation
react-optimized-image copied to clipboard

Render Google AMP conform images

Open psytraxx opened this issue 4 years ago • 1 comments

First of all - fantastic job building this stuff. I love it a lot! I have a question. Since we can also render AMP pages with next I wonder how complicated it would be to add a new param "?amp" which would render an AMP conform instead of a element? My First thought would be a switch in Img.tsx but there might be better ways to achieve this What do you think?

psytraxx avatar Sep 28 '20 17:09 psytraxx

example webp with fallback

<amp-img alt="Title"
  width="550"
  height="368"
  src="images/test.webp"
  srcset="images/test.webp 1280w, images/test.webp 640w">
  <amp-img alt="Title"
    fallback
    width="550"
    height="368"
    srcset="images/test.jpg 1280w, images/test.jpg 640w"
    src="images/test.jpg"></amp-img>
</amp-img>

psytraxx avatar Sep 28 '20 17:09 psytraxx