StaticImage

 import React, { useEffect, useRef } from "react"

import { StaticImage } from "gatsby-plugin-image"
import { gsap } from 'gsap';

export default function Hero() {

  let logo = useRef(null);

  useEffect(() => {
    let tl = gsap.timeline({ defaults: {opacity: 0, delay: 0.5} });
    tl.from(logo.current, {x:-100});  
  })

  return (
    <main>
      <div ref={logo}>
        <StaticImage
           src="../images/logo.png"
           width={500}
           alt="Hero Image"
         />
      </div>
    </main>
  )
}

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...