-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to configure imagesName and use webp #54
Comments
Hi @kachkaev, thank you for creating this issue! I just published a patch (v2.3.2) which solves this problem. |
Many thanks for the fix @cyrilwanner! All works in v2.3.3! The URLs for a jpeg / webp for that jpeg are |
👋 I'm using
next-optimized-images
with the following config:All works well and I'm getting images paths like
http:https://localhost:3000/_next/static/images/something.jpg?h=aacf4dd62f3618484aa2e017041bb9f2
. Havinghash
as a GET param is allowing users to avoid 404 pages if the images change and the app is rebuilt. For instance, if google indexeslogo.jpg?h=abc
and then the URL becomeslogo.jpg?h=def
, the logo in the search results is still a valid image. The only thing I have to worry about with this config is the uniqueness of paths, but that's a different story.After trying
webp-loader
with?webp
/<picture>
/<source>
/<image>
I've noticed an odd glitch.Instead of getting
something.jpg?h=xyz
andsomething.webp?h=zyx
forrequire("./something.jpg")
/require("./something.jpg?webp")
, the output paths aresomething.jpg?h=xyz
andsomething.jpg?h=zyx.webp
.Unsetting
imagesName
in the config solves the issue by turning paths intosomething-xyz.jpg
andsomething-zyx.webp
, but that's not quite what I'm after.What makes the URL be
something.jpg?h=zyx.webp
and notsomething.webp?h=zyx
? How to overcome this?The text was updated successfully, but these errors were encountered: