Skip to content

Instantly share code, notes, and snippets.

@sebastianbenz
Last active February 17, 2016 15:38
Show Gist options
  • Save sebastianbenz/6b43595174a8a44b9b5b to your computer and use it in GitHub Desktop.
Save sebastianbenz/6b43595174a8a44b9b5b to your computer and use it in GitHub Desktop.
<!--
#### Introduction
AMP HTML files don't support the normal HTML `img` tag. With `amp-img` AMP
provides a powerful replacement.
-->
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style>body {opacity: 0}</style><noscript><style>body {opacity: 1}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<!--
#### Basic Usage
A simple [responsive](https://www.ampproject.org/docs/guides/responsive/control_layout.html)
image - *width* and *height* are used to determine the aspect ratio.
-->
<amp-img src="img/amp.jpg" width="1080" height="610" layout="responsive" alt="an image"></amp-img>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment