png to webp
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { Box, Stack, SimpleGrid, Image as ChakraImage, Flex, useBreakpointValue } from '@chakra-ui/react'
|
||||
|
||||
import { motion } from 'framer-motion'
|
||||
function Hero1() {
|
||||
const MotionImage = motion(ChakraImage);
|
||||
const oilImage = useBreakpointValue({
|
||||
base: "/images/oilmobile.png",
|
||||
sm: "/images/oil.png",
|
||||
base: "/images/oilmobile.webp",
|
||||
sm: "/images/oil.webp",
|
||||
|
||||
});
|
||||
return (
|
||||
@@ -62,7 +63,7 @@ function Hero1() {
|
||||
h="fit-content" // or a specific height
|
||||
alignSelf="flex-start" // This constrains the Flex to its content height
|
||||
>
|
||||
<MotionImage src="/images/text1.png"
|
||||
<MotionImage src="/images/text1.webp"
|
||||
width={{ base: "90%", sm: "80%", md: "70%", lg: "70%", xl: "60%" }}
|
||||
fit="contain"
|
||||
h="auto"
|
||||
@@ -81,7 +82,7 @@ function Hero1() {
|
||||
justifyContent={{ base: "center", sm: "flex-start", md: "flex-start", lg: "flex-start", xl: "flex-start" }}
|
||||
>
|
||||
<MotionImage
|
||||
src="/images/people2.png"
|
||||
src="/images/people2.webp"
|
||||
h={{ base: "120vw", sm: "70vw", md: "50vw", lg: "50vw", xl: "50vw" }}
|
||||
// maxH={"50%"}
|
||||
marginRight={{ base: "-30%", sm: "0", md: "0", lg: "0", xl: "0" }}
|
||||
@@ -99,7 +100,7 @@ function Hero1() {
|
||||
position="relative"
|
||||
h={{ base: "30vw", sm: "30vw", md: "30vw", lg: "30vw", xl: "20vw" }}
|
||||
w="100%"
|
||||
bgImage={"url('/images/woodtable.png')"}
|
||||
bgImage={"url('/images/woodtable.webp')"}
|
||||
bgSize="cover"
|
||||
backgroundPosition="center"
|
||||
justifyContent={"center"}
|
||||
|
||||
Reference in New Issue
Block a user