-
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
[gatsby-plugin-image] mobile vs. desktop logo conflicting with gatsby-image-wrapper #31775
Comments
I can confirm the bug is still present with the latest
|
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
This issue is not stale, I am still experiencing the issue with the logo... |
I'm experiencing this error as well. |
@aaronaustin Would you mind running |
My app is fully updated and the issue is still present:
|
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Not stale, still an issue |
Hi everyone! I think I have exacty the same issue with withArtDirection() and responsive design. It seems to me that the gatsby image wrapper container retains the aspect ratio of only one image (default image) and the other image (desktop image) is put inside this container with object-fit: cover but without changing the aspect ratio of the gatsby image wrapper container, thus the desktop image gets cropped. Cropping can be prevented by adding a fixed height when the desktop image is shown, but then the desktop image does not scale with screen size... Here is my gatsby info --clipboard output System: |
Just checking in, still having this issue... All my packages are up to date but the issue still persists.
@vladar if there is anything I can do to help move this along please let me know. I have a minimum reproduction running and fully up to date here if you want to check it out. Cheers. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Not stale - the issues is still persisting |
Same here, it's ridiculous that the new gatsby-plugin-image keeps the aspect ratio of the original image. |
Is it possible to get a minimal reproduction? |
Still having this issue, on Gatsby ^4.0.0 |
Hopefully the Gatsby crew will get this sorted out in 2022. I updated the repo to Gatsby 4.4 and confirmed that the issue is still present |
Hi, I'm having this issue as well. Will show up every time I edit something during development, and will disappear when I refresh the page. Very annoying. |
Hi, I got the same error. Do you have any suggestion on fixing this? Loading hot update chunk node_modules_gatsby-plugin-image_dist_lazy-hydrate-20d22952_js failed. (error: http://localhost:8000/node_modules_gatsby-plugin-image_dist_lazy-hydrate-20d22952_js.3c5a60b46839cfb25e33.hot-update.js) Loading hot update chunk node_modules_gatsby-plugin-image_dist_intersection-observer-6b794dd8_js failed. (error: http://localhost:8000/node_modules_gatsby-plugin-image_dist_intersection-observer-6b794dd8_js.3c5a60b46839cfb25e33.hot-update.js) |
@HuyAms Sorry but I personally do not have any fixes. This issue has been open for quite some time but it looks like the folks at Gatsby are cranking through closing issues right now. So, I am optimistic it will be sorted out soon. My site has been "broken" since June of last year when |
I was able to fix the broken logo by adding
I hesitate to close the issue since so many devs were having similar issues... My solution may not work for all those who have chimed in on this issue over the past nine months or so. |
We also have this bug. In our case it helped to style the We also noticed that, depending on how we write our media query, the result is fixed for either dektop or mobile, but never both. Maybe this helps the devs/@wardpeet to debug the problem?
and this version works fine for tablet/mobile screens but not for desktop screens:
We also tried merging both queries into one, but it makes no change 😞 |
@JenniferFalkenstein I think I found a workaround for you
Or
|
@DevMostafaNassar Thanks alot for trying to help! I really appreciate it! Maybe it helps the others though, @Isaac-Tait? |
Any updates on having a fix for this? It is quite annoying to not have the image correctly rendered with a ratio correctly being set on desktop and mobile. Setting There is currently no workaround found that does not have an important performance impact (rendering manually the image after hydration based on media queries and without using Tagging you @pieh as I see you are the most active currently in the gatsby project! |
@Quentin-Danjou I was able to fix my broken logo by adding objectFit='scale-down' (docs) to the component. Did that not work for you? What version of Gatsby are you using? |
My site's desktop logo/mobile logo differing sizes are stepping on each other. At first I thought this was an issue with my code so I opened a discussion question for help but after further research I believe it is a bug.
Description
I found two similar issues #30096 and #30841 and a patch was pushed in version 1.4 to address. However, I am running v1.6.0 and I am still having a similar issue.
Here is my code:
If I open dev tools within localhost and edit the
gatsby-image-wrapper
fromconstrained
tofull_width
then the logo is rendered "correctly". However, if I update within my codeconstrained
tofull_width
then I get a slew of error messages in the console and local host (see screenshot below).Also, I get
Uncaught (in promise) ChunkLoadError: Loading hot update chunk node_modules_gatsby-plugin-image_dist_lazy-hydrate-4711f4b0_js failed. (missing: http://localhost:8000/node_modules_gatsby-plugin-image_dist_lazy-hydrate-4711f4b0_js.e64bd67ae4a8e3135120.hot-update.js)
in the console which may be related to #18866 (???) After clearing the error messages the logo is still rendering incorrectly (both the live site and localhost currently have this issue)...Here are two screen shots of the before and after edits of
gatsby-image-wrapper
from the dev tools.So, it would seem that the edits I am making in the query with
useStaticQuery
are not being pushed togatsby-image-wrapper
for some reason...Steps to reproduce
You should see the issue on the home page of my minimum repo here make sure to switch from mobile to desktop view in dev tools to see the logo switch...
Expected result
I should be able to seamlessly switch from my desktop logo and mobile logo and have the appropriate sizes of the png files rendered on the screen.
Actual result
The logo is only partially showing, or zoomed all the way in and when I attempt to edit the code in
layout.js
I get multiple runtime errors (that are often cleared by refreshing the browser but sometimes have to be cleared withgatsby clean
and restart of localhost) and ChunkLoadErrors (as mentioned above in DescriptionEnvironment
System:
OS: macOS 11.4
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.2.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.15.1 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Firefox: 88.0.1
Safari: 14.1.1
npmPackages:
gatsby: ^3.6.1 => 3.6.1
gatsby-awesome-pagination: ^0.3.8 => 0.3.8
gatsby-plugin-disqus: ^1.2.2 => 1.2.2
gatsby-plugin-feed: ^3.5.0 => 3.5.0
gatsby-plugin-gatsby-cloud: ^2.5.0 => 2.5.0
gatsby-plugin-google-analytics: ^3.5.0 => 3.5.0
gatsby-plugin-image: ^1.6.0 => 1.6.0
gatsby-plugin-manifest: ^3.5.0 => 3.5.0
gatsby-plugin-offline: ^4.5.1 => 4.5.1
gatsby-plugin-postcss: ^4.5.0 => 4.5.0
gatsby-plugin-react-helmet: ^4.5.0 => 4.5.0
gatsby-plugin-sharp: ^3.6.0 => 3.6.0
gatsby-remark-copy-linked-files: ^4.2.1 => 4.2.1
gatsby-remark-images: ^5.2.1 => 5.2.1
gatsby-remark-prismjs: ^5.2.1 => 5.2.1
gatsby-remark-responsive-iframe: ^4.2.1 => 4.2.1
gatsby-remark-smartypants: ^4.2.0 => 4.2.0
gatsby-source-filesystem: ^3.6.0 => 3.6.0
gatsby-transformer-remark: ^4.2.0 => 4.2.0
gatsby-transformer-sharp: ^3.6.0 => 3.6.0
npmGlobalPackages:
gatsby-cli: 2.12.111
The text was updated successfully, but these errors were encountered: