-
Notifications
You must be signed in to change notification settings - Fork 17
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
In XP preview, next/image Images keep their local-to-next.js URLs even when src is prefixed with XP proxy #61
Comments
Path resolution, or hydration-update problem after the SSR? Might be related to #60 . |
Should probably not use the image "module" in next at all? |
Alas, images should be added with URL's from XP. |
As in, choose not to support it? We might, but it's such an encouraged part of next that a default linting rule in next is to break the build if |
Two different things. Urls from XP are easier, this issue concerns next's /public/, the parallel to our /assets/. I think we should support this. |
The next.js |
When using the
<Image
tag fromnext/image
, asrc
prop that refers to a file undersrc/public
, is processed to a proprietary format.For example:
import xpShield from '../../public/images/xp-shield.svg';
...and...
<Image src={xpShield}
...is server-side-rendered by next.js into...
The XP-side proxy processes this to point to the asset proxy instead...
But the browser still tries, and fails, to fetch the first-generated url from the XP root:
http://localhost:8080/_next/image?url=%2F_next%2Fstatic%2Fimage%2Fsrc%2Fpublic%2Fimages%2Fxp-shield.074583348b1b4aee2574f3e054e22a93.svg&w=96&q=75
The text was updated successfully, but these errors were encountered: