Skip to content
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

[bug] product images not found at order completion page #1525

Closed
julianocosta89 opened this issue Apr 15, 2024 · 2 comments
Closed

[bug] product images not found at order completion page #1525

julianocosta89 opened this issue Apr 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@julianocosta89
Copy link
Member

Bug Report

Which version of the demo you are using?
742594f

Symptom

After #1462 got merged, when running the demo, the images are not loaded on the order completion page:

image

What is the expected behavior?

All product images should be properly loaded.

Reproduce

Clone main, run the demo, navigate to the web ui and buy a product.

@julianocosta89 julianocosta89 added the bug Something isn't working label Apr 15, 2024
@klucsik
Copy link
Contributor

klucsik commented Apr 15, 2024

The frontend tries tor reach the image in the url: http://localhost:8080/_next/image?url=%2Fimages%2Fproducts%2FRoofBinoculars.jpg&w=96&q=75
Which doesn't exist since Imageprovider.
Strangely the bit in the CheckouItem.tsx looks exactly the same.
So this is caused by some nextjs image optimization logic, I'm digging

@klucsik
Copy link
Contributor

klucsik commented Apr 15, 2024

This commit Fixes the issue by passing down the optimization request to the imageprovider service. The imageprovider doesnt have anything similar implemented, so the resulting images are distorted.
image

This can be done with https://nginx.org/en/docs/http/ngx_http_image_filter_module.html nginx module, which would need a more complex imageprovider setup (as we need to install both this and otel module to nginx is beyond the easy apt-get install capabilities).
Maybe we should put this loader globally, as it is a bit odd in this specific component, but as I see, no other image is resized by react, even in responsive view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants