Skip to content

Instantly share code, notes, and snippets.

@Kikiodazie
Created April 13, 2022 16:24
Show Gist options
  • Save Kikiodazie/2984f94b78a66a302fd41a074a14918a to your computer and use it in GitHub Desktop.
Save Kikiodazie/2984f94b78a66a302fd41a074a14918a to your computer and use it in GitHub Desktop.
Automated Image Responsiveness Using Cloudinary Core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script
src="https://unpkg.com/cloudinary-core@latest/cloudinary-core-shrinkwrap.js"
type="text/javascript"
></script>
<title>Automated Image Responsiveness</title>
</head>
<body>
<h1></h1>
<img
data-src="https://res.cloudinary.com/dodazie/image/upload/c_scale,w_auto/dpr_auto/happy.jpg"
class="cld-responsive"
/>
<script type="text/javascript">
var cloudinary = cloudinary.Cloudinary.new({
cloud_name: "dodazie"
});
cloudinary.responsive();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment