Skip to content

Commit 7943c51

Browse files
committed
better image preloading
1 parent dea4bd3 commit 7943c51

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/app/about/interact.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,8 @@ const Interact = () => {
155155
alt="sorry, alt not implemented"
156156
priority
157157
/>
158-
{/* preload next image so that it is ready (is this the optimal way?? seems like it works...)*/}
159-
<Image
160-
src={pages[nextPage].image}
161-
height='300'
162-
width='200'
163-
className="hidden"
164-
alt="sorry, alt not implemented"
165-
/>
158+
{/* preload next image... i wish there was a better way to do this*/}
159+
<link rel="preload" href={pages[nextPage].image} as="image"></link>
166160
</div>
167161

168162
<div className="w-full border-2 border-gray-800 rounded p-2">

0 commit comments

Comments
 (0)