Skip to content

Commit

Permalink
fix cloudinary loader (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhnmht30 authored Jan 29, 2021
1 parent a86e12b commit 20be49a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
12 changes: 0 additions & 12 deletions components/MyImage.js

This file was deleted.

16 changes: 1 addition & 15 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Head from "next/head";
import MyImage from "../components/MyImage";
import Image from "next/image";
import styles from "../styles/Home.module.css";

Expand All @@ -23,23 +22,10 @@ export default function Home() {
</p>

<div className={styles.grid}>
{[1, 2].map((n, i) => (
{[1, 2, 3, 4].map((n, i) => (
<Image key={i} src={`/coffee-${n}.jpg`} width={640} height={426} />
))}
{[3, 4].map((n, i) => (
<MyImage
key={i}
src={`/coffee-${n}.jpg`}
width={640}
height={426}
/>
))}
</div>
<p className={styles.description}>
First 2 images are optimised through netlify functions and last 2
images are optimised using cloudinary as the loader. See the
difference in performance by disabling cache and throttling network.
</p>
</main>

<footer className={styles.footer}>
Expand Down

0 comments on commit 20be49a

Please sign in to comment.