-
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-source-wordpress: image rewriting no longer works with the introduction of IMAGE_CDN (i.e. gatsby >= 4.10.x) #35626
Comments
In the network tab I can see the following 404s:
|
reran the generated sample with the following versions "gatsby": "4.9.1",
"gatsby-plugin-image": "2.11.1",
"gatsby-plugin-manifest": "4.9.1",
"gatsby-plugin-offline": "5.9.1",
"gatsby-plugin-react-helmet": "5.9.0",
"gatsby-plugin-sharp": "4.9.1",
"gatsby-source-filesystem": "4.11.1",
"gatsby-source-wordpress": "6.9.1",
"gatsby-transformer-sharp": "4.9.0", With that all the images look good. |
while not directly related, but #35151 shows the commit with which the image rewriting was changed towards the |
Hey @rburgst 👋 I just followed the reproduction steps and the images do seem to be loading correctly for me (no 404's in the network tab). The <img src="/_gatsby/file/406ca6ba97b4c609708eb571aa991c5e/image-alignment-580x300-1.jpg?u=https%3A%2F%2Fwpgatsbydemo.wpengine.com%2Fwp-content%2Fuploads%2F2013%2F03%2Fimage-alignment-580x300-1.jpg" alt="Image Alignment 580x300" class="wp-image-906 inline-gatsby-image-wrapper" data-reactroot=""> The images are rendering in the browser for me to: When using the Hopefully that will help narrow down where the bug is happening. Thanks! |
hmm, very weird. I can now see the images again. I still have a rewriting problem in my production database. Obviously its not so simple as I had thought. I will try to replicate our problem and produce a repro. |
I will create a new issue as the title is no longer correct |
Preliminary Checks
Description
It appears that with the introduction of IMAGE_CDN the whole html image rewriting to gatsby image no longer works.
It appears that it is no longer possible to use gatsbyImage without IMAGE_CDN, the HTML content that gets rewritten appears to require gatsby functions (and probably the IMAGE_CDN) to be present.
Reproduction Link
https://github.com/gatsbyjs/gatsby-starter-wordpress-blog
Steps to Reproduce
npx gatsby new gatsby-starter-wordpress-blog https://github.com/gatsbyjs/gatsby-starter-wordpress-blog
cd gatsby-starter-wordpress-blog
yarn build
yarn serve
now open the URL localhost:9000/block-image/
and inspect the HTML
Expected Result
Images should be rewritten to static gatsby images
e.g. (this is the output with gatsby 4.9.1)
Actual Result
All of the images are being rewritten to something like
Specifically look at the image srcset url:
http://localhost:9000/_gatsby/image/406ca6ba97b4c609708eb571aa991c5e/7d9d8c0a03f4a29416110437c078ce56/image-alignment-580x300-1.jpg
This URL does not resolve. Actually I am not even sure whether this would be taken into account anyway as the
<img
tag has no normalsrc
orsrcset
tag.Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: