magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 683 forks source link

[bug]: Thumbnails are requested on Venia PDP in mobile #1041

Closed sirugh closed 5 years ago

sirugh commented 5 years ago

Describe the bug In the Venia Storefront in a mobile view the page requests the thumbnail images unnecessarily.

In the following screenshot you can see the displayed image (640px) but you also can see the two thumbnails (240px) being requested. Image from Gyazo

To Reproduce Steps to reproduce the behavior:

  1. Open a PDP in mobile view with the network tab open.
  2. See that large (~640) and small (~240) images are requested.

Expected behavior Only the necessary images are requested. On Desktop that would be large & small images but on mobile that should only be the large images.

Please complete the following device information:

Please let us know what packages this bug is in regards to:

Possible solutions Avoid mounting thumbnail components when viewport is below a certain width.

dmshm commented 5 years ago

Please, assign me.