-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Losing img quality in gatsby-image #3984
Comments
You can set quality: childImageSharp {
sizes(quality: 90) {
#your fragment or fields
}
} |
\o/ It works!!! Thank you very much @pieh!!! |
it works thanks |
For some reason this property only worked for me when I used it in combination with the maxWidth prop like this:
I have that high width since I am using it as a background... The full code can be found and run of the file at https://github.com/moritzWa/moritz-homepage/blob/master/src/pages/cookup.js |
This works for me, but i have some images with text and the text gets a little blurry. When i browse into my generated images in the filesystem ( which i get from gatsby ) they have a good quality but when i use them with grapql query in this way i get blurry texts. |
I'm also having blurry images with quality set to 100, not sure what the issue is. |
My problem in this case was the width of the images, with fluid you can ask for a width, if the width is bigger than the image the image results stretched. |
So, apparently I'm having the blurry image issue by using |
I had the same issue and solution as @moritzWa, the quality of the .jpg images was not increased unless I also set the |
you can dial up the webP quality separately with
|
I have the same issue but with different condition: I am using fluid and not fixed, with a maxWidth (1920, for example) setted. When window is around 1920px I can not see any kind of low quality, but if I try to reduce size of window image quality decrease dramatically (totaly blurry).
If I try to switch to fixed instead of fluid and query for the same image with Any suggestion to overcome? EDIT: using |
fwiw this is still happening to me too: Clear in development, completely pixelized in production. |
I've been dealing with this issue. I found that using the prop This is the basis of an HD screen, each computed px is actually made by multiple real px. So back to the example, if the computed size of the element is 100px, then the real size is (hypothetically) 200px. Then, using the As a fix i decided to not use the width prop, and just control the size of the img with Css. |
Description
I'm using gatsby-image and I've been noticed that my generated png images have a very low quality.
Trying to figure out why it's happening I got that gatsby-plugin-sharp have in its quality parameter a default value in 50. So our images are losing 50% of quality in this process.
Would be very nice if we could set some sharp parameters as quality and compression levels through gatsby-image plugin. :-)
Seems that we couldn't control the compression quality by gatsby-image, you guys can help me in find one way to improve my image's quality and still using the gatsby-image facilities?
Image without gatsby-image:

Image with gatsby-image:

Environment
Gatsby version: 1.1.10
Node.js version: v6.10.3
Operating System: Mac OS X
The text was updated successfully, but these errors were encountered: