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

[question] Retain params in src url instead of parsing and treating as props? #43

Open
ekafyi opened this issue Apr 30, 2022 · 2 comments

Comments

@ekafyi
Copy link

ekafyi commented Apr 30, 2022

Hi, thanks for the great work.

I notice that query parameters in the src URL are parsed and passed as props to the underlying API.

Example:

<Picture src="https://images.unsplash.com/photo-1520520731457-9283dd14aa66?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb" alt="something" />

Strips off the image parameters and produces these warning:

[astro-imagetools]  ixlib  is not a valid Picture Config Option
[astro-imagetools]  q  is not a valid Picture Config Option
[astro-imagetools]  fm  is not a valid Picture Config Option
[astro-imagetools]  crop  is not a valid Picture Config Option
[astro-imagetools]  cs  is not a valid Picture Config Option

Is it possible to make the Picture component process the full URL without parsing the query parameters that way?

Thank you!

@RafidMuhymin
Copy link
Owner

It's really a major issue and I too have faced this many times. Thanks for opening an issue on GitHub.

@gbouteiller
Copy link

I encountered the same issue with images from Notion SDK : image urls contain security params to be displayed but these params are removed by the plugin. Would it be possible to have a config option for that?
Thank you!

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

3 participants