Open hrishikesh-k opened 2 months ago
Reproduction repo: https://github.com/hrishikesh-k/t-rish. In it, I have an animated GIF: https://github.com/hrishikesh-k/t-rish/blob/main/src/routes/work/four-forty-four/assets/hamilton-1.gif
I'm using vite-imagetools to only get the metadata (height,src,width) of an image. I am offloading image transformations to Netlify Image CDN, so the metadata is all I need. However, somewhere in this process, the animation of the GIF is lost.
vite-imagetools
height,src,width
This is where I'm setting the metadata params: https://github.com/hrishikesh-k/t-rish/blob/main/vite.config.ts#L10 and this is where I'm importing the image: https://github.com/hrishikesh-k/t-rish/blob/main/src/routes/work/four-forty-four/%2Blayout.ts#L4. At first I was confused to understand why the animation is not working in the browser, but when I inspected the image in the output directory ./build/_app/immutable/assets/hamilton-1.[hash].gif, I found out that it's the generated image that doesn't animate anymore.
./build/_app/immutable/assets/hamilton-1.[hash].gif
What am I doing wrong?
Reproduction repo: https://github.com/hrishikesh-k/t-rish. In it, I have an animated GIF: https://github.com/hrishikesh-k/t-rish/blob/main/src/routes/work/four-forty-four/assets/hamilton-1.gif
I'm using
vite-imagetools
to only get the metadata (height,src,width
) of an image. I am offloading image transformations to Netlify Image CDN, so the metadata is all I need. However, somewhere in this process, the animation of the GIF is lost.This is where I'm setting the metadata params: https://github.com/hrishikesh-k/t-rish/blob/main/vite.config.ts#L10 and this is where I'm importing the image: https://github.com/hrishikesh-k/t-rish/blob/main/src/routes/work/four-forty-four/%2Blayout.ts#L4. At first I was confused to understand why the animation is not working in the browser, but when I inspected the image in the output directory
./build/_app/immutable/assets/hamilton-1.[hash].gif
, I found out that it's the generated image that doesn't animate anymore.What am I doing wrong?