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

[gatsby-transformer-sharp] Remove the default width value from gatsby-transformer-sharp #7663

Closed
Windvis opened this issue Aug 26, 2018 · 1 comment
Labels
help wanted Issue with a clear description that the community can help with. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@Windvis
Copy link
Contributor

Windvis commented Aug 26, 2018

Summary

In this commit (which was released in gatsby 2.0.0-rc.0) the requirement of a width value was removed. I believe this should make it possible to set a height, and make sharp calculate the width of the image. The problem is that gatsby-transformer-sharp still has the default values set, so using those methods in a query still results in the width being set to 400 (the default).

It would be awesome if gatsby-transformer-sharp was also updated with these changes.

Motivation

I'm trying to create a portfolio website with an image grid which needs all images to be of the same height and width being variable, but as far as I know this is not yet possible with the current implementation.

@Chuloo Chuloo added help wanted Issue with a clear description that the community can help with. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change labels Aug 27, 2018
@Windvis
Copy link
Contributor Author

Windvis commented Aug 27, 2018

I can take a look at this. Should I just remove the default values? Should there be some validation on the arguments? (Width or height should be set for example) I'm fairly new to GraphQl so I'm not sure if that is something that is done in practise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

No branches or pull requests

2 participants