Ahmed Mohamed 🇵🇸• 310
@ahmedafsa
Posted
Hello @kylecloete, great work!
- Regarding the product image It is better to use the
<picture>
element with<source>
tags to make it responsive where based on your screen width, the appropriate image will be loaded instead of the two<img>
elements.
<picture>
<source
srcset="images/image-product-mobile.jpg"
media="(max-width: 600px)"
/>
<source
srcset="images/image-product-desktop.jpg"
media="(min-width: 601px)"
/>
<img src="images/image-product-desktop.jpg"/>
</picture>
Best wishes to you!
Marked as helpful
1