-
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
feat(gatsby-remark-images): add disableBgImage option #19152
Conversation
… "Stylesheet too long" error on AMP
… "Stylesheet too long" error on AMP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, let's just do small change to docs and upload missing snapshot file.
You can generate one by running yarn gatsby-remark-images -u
in root of repository.
Co-Authored-By: Michal Piechowiak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what's wrong with my environment. I got the result when I ran yarn workspace gatsby-remark-images test -u
.
- style=\\"padding-bottom: 133.33333333333331%; position: relative; bottom: 0; left: 0; background-image: url('data:image/svg+xml,%3csvg /'MOCK SVG/'%3c/svg%3e'); background-size: cover; display: block;\\"
+ style=\\"padding-bottom: 133.33333333333331%; position: relative; bottom: 0; left: 0; background-image: url('data:image/svg+xml,%3csvg \\\\'MOCK SVG\\\\'%3c/svg%3e'); background-size: cover; display: block;\\"
This might be related to our jest config. We have top level jest configuration, so if in root you run When I run your command, I also got same result, so there's nothing wrong in your environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dsewnr!
Holy buckets, @dsewnr — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Description
There's a very long inline style on bgImage. Lots images are possible to exceed the 50,000 bytes limit on AMP.
disableBgImage
can be used to prevent "Stylesheet too long" error on AMP