Skip to content

Conversation

@Wreck-X
Copy link
Member

@Wreck-X Wreck-X commented Oct 25, 2025

-> converts all images in the gallery sub-directory to webp

fixes #1

@vercel
Copy link

vercel bot commented Oct 25, 2025

@Wreck-X is attempting to deploy a commit to the amFOSS Dev Team on Vercel.

A member of the Team first needs to authorize it.

@KKSurendran06
Copy link
Member

doesn’t Next.js already handle webP optimization automatically via the next/image component, even when using JPG sources?

@Wreck-X
Copy link
Member Author

Wreck-X commented Oct 25, 2025

doesn’t Next.js already handle webP optimization automatically via the nex

oh it does? lemme see

@Wreck-X
Copy link
Member Author

Wreck-X commented Oct 25, 2025

doesn’t Next.js already handle webP optimization automatically via the next/image component, even when using JPG sources?

only if you use <Image/> component apparently

import Image from "next/image";
const Slider = ({ sliderImageUrl, showDescription }) => {
    return (
        <div className="parent py-10">
            <Carousel
                responsive={responsive}
                autoPlay={true}
                swipeable={true}
                draggable={true}
                // showDots={true}
                infinite={true}
                partialVisible={false}
                dotListClass="custom-dot-list-style"
            >
                {sliderImageUrl.map((imageUrl, index) => {
                    return (
                        <div className="slider group" key={index}>
                            <img src={imageUrl.url} Transition={Blur} loading="lazy"/>
                            {showDescription && ( 
                            <div className="absolute rounded-b-[0.6rem] inset-x-0 bottom-8 bg-black bg-opacity-80 py-2 px-4 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-300">
                                <p className="text-center">{imageUrl.description}</p>
                            </div>
                            )}
                        </div>
                    );
                })}
            </Carousel>
        </div>
    );
};

we seem to be using <img> over here

@Wreck-X Wreck-X closed this Oct 25, 2025
@Wreck-X Wreck-X reopened this Oct 25, 2025
@KKSurendran06
Copy link
Member

KKSurendran06 commented Oct 25, 2025

only if you use <Image/> component apparently

Yup have an issue for that

@Wreck-X
Copy link
Member Author

Wreck-X commented Oct 25, 2025

ill just change the <img> tag to <Image> then? at least for the gallery page, I could leave the others for someone else i suppose or i could just do them all right now.

@KKSurendran06
Copy link
Member

Yep sure! you might need to tweak the width and height properties accordingly

@Wreck-X
Copy link
Member Author

Wreck-X commented Oct 25, 2025

should be fine now @KKSurendran06, also i think we should keep all the images in webp anyway by convention. easier to worry about them than img tags inbetween lines of code

@vercel
Copy link

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
amfoss-in Ready Ready Preview Comment Oct 25, 2025 5:39pm

@KKSurendran06
Copy link
Member

lgtm

@KKSurendran06 KKSurendran06 merged commit 5121f61 into amfoss:develop Oct 31, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize the Gallery page

2 participants