JonasKruckenberg / imagetools

Load and transform images using a toolbox :toolbox: of custom import directives!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

?webp shorthand still works on 5.0.4

khromov opened this issue · comments

I have imports like this:

import ribbonImage from '$lib/assets/ribbon.png?webp';

After updating to 5.0.4, I can still use these shorthands, even though in the changelog it said they were removed:
https://github.com/JonasKruckenberg/imagetools/blob/main/packages/vite/CHANGELOG.md

# npm ls vite-imagetools
/project
└── vite-imagetools@5.0.4

Hmm, I definitely wouldn't expect it to work. The code was removed in #537

Are you sure it's actually generating a webp image? I just tried:

<img src="./_images/closefactor.png?webp" alt="CloseFactor" />

And it gave me back a png:
Screenshot from 2023-10-17 11-14-20