Skip to content
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

Image url still comes with default query strings of q and w even if set with the builder #64

Open
SaidiAli opened this issue Dec 19, 2023 · 0 comments

Comments

@SaidiAli
Copy link

If you find a security vulnerability, do NOT open an issue. Email [email protected] instead.

Describe the bug

When i return the url of an image asset, it comes with default transformation queries of q for quality set to 75 and w for width set to 640. i want to have maximum quality and the default width. When i set these parameters using the urlBuilder, the url returned has both of the above parameters duplicated:
https://cdn.sanity.io/images/yncg0snw/production/74e02c91401ae000160f4497161b3c959dc80e01-777x472.jpg?q=100?w=640&q=75

This leads to an error: {"statusCode":400,"error":"Bad Request","message":"Parameter \"q\" must be a valid integer"}

Expected behavior

I expected the quality query string to be replaced with set value but instead both of them are returned

Which versions of Sanity are you using?

@sanity/cli (global) 3.21.0 (latest: 3.21.3)

What operating system are you using?

MacOs Silicon chip

Which versions of Node.js / npm are you running?

10.2.3
v21.2.0

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

No branches or pull requests

1 participant