Skip to content

Instantly share code, notes, and snippets.

@ysm-dev
Created August 28, 2019 06:25
Show Gist options
  • Select an option

  • Save ysm-dev/04f0640910db7822dc4a6def5ac9e80c to your computer and use it in GitHub Desktop.

Select an option

Save ysm-dev/04f0640910db7822dc4a6def5ac9e80c to your computer and use it in GitHub Desktop.

Revisions

  1. ysm-dev created this gist Aug 28, 2019.
    28 changes: 28 additions & 0 deletions Markdium-HTML.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    <picture>
    <source
    srcset="
    /some/_1170x658_crop_center-center/man-with-a-dog.webp 1170w,
    /some/_970x545_crop_center-center/man-with-a-dog.webp 970w,
    /some/_750x562_crop_center-center/man-with-a-dog.webp 750w,
    /some/_320x240_crop_center-center/man-with-a-dog.webp 320w
    "
    sizes="100vw"
    type="image/webp"
    />
    <source
    srcset="
    /some/_1170x658_crop_center-center/man-with-a-dog.jpg 1170w,
    /some/_970x545_crop_center-center/man-with-a-dog.jpg 970w,
    /some/_750x562_crop_center-center/man-with-a-dog.jpg 750w,
    /some/_320x240_crop_center-center/man-with-a-dog.jpg 320w
    "
    sizes="100vw"
    />
    <img
    src="/some/man-with-a-dog-placeholder.jpg"
    alt="Man with a dog"
    style="object-fit: cover;"
    loading="lazy"
    />
    </picture>
    <!-- The final way -->