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

fix: Minicart product image size #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

darlenedms
Copy link

Fix cart thumb images resolution.

BEFORE
before

AFTER
after

I guess we will want to move the function to a VTEX specific folder and be more clever to decide the image size.
Based on https://github.com/vtex-apps/checkout-graphql/blob/9b4959bf7b36971f2a1e2449cd7a108ff10b728f/node/utils/image/vtex.ts

@tlgimenes
Copy link
Contributor

Nice! However, I didn't want to move this computation to the frontend. Don't they have a config to do it on VTEX API side? AFAIK each store has a default checkout image size that the checkout API responds. If there is such a config, I'd rather go with it and remove this computing from the frontend

@darlenedms
Copy link
Author

I know it's hard to believe but I don't think it exists for images returned in the orderForm. We always did this string manipulation in the cart, old (Knockout.js) and new. 🫠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants