Skip to content

Minicart thumbnail image showing wrong size in frontend which is half of image size in XML file #35275

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

Closed
csvikram44 opened this issue Apr 7, 2022 · 29 comments
Assignees
Labels
Area: Cart & Checkout Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed non-issue Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@csvikram44
Copy link

csvikram44 commented Apr 7, 2022

After upgrading Magento version from 2.3.5-p1 to 2.4.3-p1, I am facing the problem of minicart thumbnail size. I found that in the view.xml file, the width and height of half the size set for the minicart thumbnail shows in the frontend minicart.

Note: It works fine in my old Magento version that the size which is in view.xml file shows the width and height of the size in the frontend.

Preconditions (*)

  1. Magento version 2.4.3-p1

Steps to reproduce (*)

Important: By the way, this is the default issue in both Blank and Luma themes.

  1. Create any one product and upload the thumbnail image of the product in it.
  2. Go to Front End and add product to cart.
  3. You will see thumbnail images of the product in the minicart.
  4. If you inspect it, the image loads the same size as it would in view.xml but in the upper HTML tag takes half width and height attribute and due to that minicart design is breaking and showing small thumbnail image.
  5. For example, if you enter the 150x150 width and height in the view.xml file, then it will show 75x75 px inline width and height attributes in the upper HTML tag.
    <image id="mini*cart_product*thumbnail" type="thumbnail"> <width>75</width> <height>75</height> </image>

Expected result (*)

  1. Prodcut item width and height of the tag should be 150px shown which is given in the view.xml file

Actual result (*)

  1. It is showing 75x75 px width & height in tag. See above screenshots

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • < > Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • < > Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • < > Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • < > Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • < > Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Apr 7, 2022

Hi @csvikram44. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@csvikram44
Copy link
Author

@magento give me a 2.4-develop instance.

@magento-deployment-service
Copy link

Hi @csvikram44. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @csvikram44, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@csvikram44
Copy link
Author

@magento When will I get the update from your side?

@csvikram44
Copy link
Author

@magento give me a 2.4-develop instance.

@magento-deployment-service
Copy link

Hi @csvikram44. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @csvikram44, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-Delta engcom-Delta self-assigned this Apr 7, 2022
@m2-assistant
Copy link

m2-assistant bot commented Apr 7, 2022

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@ihor-sviziev
Copy link
Contributor

Hi @csvikram44,
That was a fix for the issue #24735, so I believe everything is right there.

@csvikram44
Copy link
Author

@ihor-sviziev My problem is not with the blurry image. In MiniCart, a thumbnail image of half the size of the image entered in the XML file appears in the MiniCart.

File path:
app/design/frontend/{Vendor}/{theme-name}/etc/view.xml

<image id="mini_cart_product_thumbnail" type="thumbnail"> <width>75</width> <height>75</height> </image>

See below screenshot, I added 75px width & height for mini_cart_product_thumbnail in the view.xml file but it shows 37.5px width and due to that it looks small. Instead of showing 37.5px, It should be the 75px width that is entered in the view.xml file.

image

@ihor-sviziev
Copy link
Contributor

@csvikram44 right, you should put here 2x size of the image = 150

@csvikram44
Copy link
Author

@ihor-sviziev But why do I need to load a double-size thumbnail image? If I add 10 items to the mini cart then the page load will increase because it loads twice the size of images which is not correct. Also, it was running fine in the old version.

Is there any other reason behind doubling the image size?
Note: A developer will enter the size in view.xml that he wants to display on the frontend and not double that.

@csvikram44
Copy link
Author

@ihor-sviziev I hope you understand my point properly. In my view, this is an issue and because of this, all developers will have to face this problem whenever they upgrade from the lower to the latest Magento version.

@ihor-sviziev
Copy link
Contributor

@csvikram44 the reason for that - retina/4k displays that becoming more and more popular everywhere both in mobile and on computers now.
The 1x images looks blurry on these displays, so you have to provide 2x sized images.

@csvikram44
Copy link
Author

@ihor-sviziev Thanks for the update.

I checked by uploading different images, and none of the images are getting blurred. But there are a lot of chances of loading issues increasing in speed on mobile when multiple product items are added. Please think about it one more time and update me.

@engcom-Delta
Copy link
Contributor

Hi @csvikram44 ,
Thank you for reply and we tried to reproduce the issue on Magento 2.4 Develop and found that issue is reproducible.
Product item width and height of the tag is not same on Minicart when compared to view.xml.

View.xml

Screenshot 2022-04-08 at 10 26 24 PM

in Mini cart & Shipping page:
Screenshot 2022-04-08 at 10 22 44 PM
Screenshot 2022-04-08 at 10 22 44 PM

Hence , issue has been confirmed.

@engcom-Delta engcom-Delta added Area: Cart & Checkout Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Issue: ready for confirmation labels Apr 8, 2022
@engcom-Delta engcom-Delta added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Apr 8, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-2808 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Apr 8, 2022

✅ Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-Hotel engcom-Hotel added the Priority: P3 May be fixed according to the position in the backlog. label Apr 12, 2022
@olegpola
Copy link

olegpola commented May 6, 2022

@magento I am working on this

@m2-assistant
Copy link

m2-assistant bot commented May 6, 2022

Hi @olegpola! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@olegpola
Copy link

olegpola commented May 6, 2022

@magento add to contributors team

@m2-assistant
Copy link

m2-assistant bot commented May 6, 2022

Hi @olegpola! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@olegpola
Copy link

olegpola commented May 7, 2022

@magento I am working on this

@TuVanDev
Copy link
Member

TuVanDev commented Sep 20, 2022

Hi @csvikram44
This issue is invalid.
In the changes in PR 24743 in order to fix issue #24735, @dmdanilchenko changed the width (and height) in both HTML and XML files:
app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html
app/design/frontend/Magento/blank/etc/view.xml
app/design/frontend/Magento/luma/etc/view.xml
You can take a look at PR's changed files here: https://github.com/magento/magento2/pull/24743/files

You guys had this issue because you declared width and height for<image id="mini_cart_product_thumbnail" type="thumbnail"> in /etc/view.xml. But with the new change in PR 24743, the width and height size should be double in /etc/view.xml.

Conclusion: The correct solution is double the size of height and width for <image id="mini_cart_product_thumbnail" type="thumbnail"> in /etc/view.xml, not changing any from app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html.

@Rickertje
Copy link

Can somebody comment on the status of this issue? Some say this is a valid issue and others say it is not. Imho the need to double the size in view.xml just to get back to how things were before seems a somewhat strange solution to the issue description.

@TuVanDev
Copy link
Member

TuVanDev commented Mar 8, 2023

@Rickertje This issue should be closed. The need to double the size in view.xml is for fixing issue #24735. If you are still confused, please read my comment above (I've just updated it to say the change in order to fix #24735).
@engcom-Delta could you check my comment and mark this issue as closed?

@ihor-sviziev
Copy link
Contributor

Hi @csvikram44,
I do agree with @Viper9x, the image should be 2x sized.
I'm closing this issue as not relevant.

@ihor-sviziev ihor-sviziev closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
@ihor-sviziev ihor-sviziev self-assigned this Mar 10, 2023
@m2-assistant
Copy link

m2-assistant bot commented Mar 10, 2023

Hi @ihor-sviziev. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Cart & Checkout Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed non-issue Priority: P3 May be fixed according to the position in the backlog. Progress: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants