import * as React from "react"; import { graphql, useStaticQuery } from "gatsby"; import Image, { FixedObject } from "gatsby-image"; import styled from "@emotion/styled"; const RoundedImage = styled(Image)` margin-bottom: 10px; border-radius: 140px; `; export interface AvatarComponentQuery { image: { childImageSharp: { sqip: { dataURI: string }; fixed: FixedObject; }; }; } export const Avatar = (): React.ReactElement => { const data = useStaticQuery(graphql` query KeplerAvatarComponentQuery { image: file( relativePath: { eq: "avatar.jpg" } sourceInstanceName: { eq: "assets" } ) { childImageSharp { sqip(numberOfPrimitives: 100, blur: 0) { dataURI } # Specify the image processing specifications right in the query. # Makes it trivial to update as your page's design changes. fixed(width: 200, height: 200, quality: 90) { ...GatsbyImageSharpFixed_withWebp_noBase64 } } } } `); return (
); };