Skip to content

Commit

Permalink
change image to picture - fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
surjithctly committed Jan 11, 2023
1 parent f13ba93 commit 789e127
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Layout from "@layouts/Layout.astro";
import Container from "@components/container.astro";
import Sectionhead from "@components/sectionhead.astro";
import { Image } from "@astrojs/image/components";
import { Picture } from "@astrojs/image/components";
const TeamImg1 =
"https://images.unsplash.com/photo-1580489944761-15a19d654956?&fit=crop&w=280";
Expand Down Expand Up @@ -64,11 +64,15 @@ const team = [
team.map((item) => (
<div class="group">
<div class="w-full aspect-square">
<Image
<Picture
{...item.avatar}
format="avif"
alt="Team"
widths={[200, 400]}
aspectRatio="1:1"
sizes="(max-width: 800px) 100vw, 400px"
class="w-full h-full object-cover rounded transition group-hover:-translate-y-1 group-hover:shadow-xl"
format="avif"
/>
</div>

Expand Down

1 comment on commit 789e127

@vercel
Copy link

@vercel vercel bot commented on 789e127 Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.