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.
To Reproduce
Steps to reproduce the behavior:
Open a PDP in mobile view with the network tab open.
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:
Device: Macbook Pro
OS: Mojave
Browser: Chrome
Version [e.g. 22]
Magento Version: 2.3.1
NPM version npm -v 6.7.0
Node Version node -v 11.6.0
Please let us know what packages this bug is in regards to:
[x] venia-concept
[ ] pwa-buildpack
[ ] peregrine
[ ] pwa-devdocs
[ ] upward-js
[ ] upward-spec
Possible solutions
Avoid mounting thumbnail components when viewport is below a certain width.
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.
To Reproduce Steps to reproduce the behavior:
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:
npm -v
6.7.0node -v
11.6.0Please let us know what packages this bug is in regards to:
venia-concept
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
Possible solutions Avoid mounting thumbnail components when viewport is below a certain width.