@hitmorecode
Posted
The picture element should work just fine, in case you want a work around you can do something like this
html
<img id="product-image-desktop" alt="Perfume bottle" src="./Project Requirements/images/image-product-desktop.jpg">
<img id="product-image-mobile" alt="Perfume bottle" src="./Project Requirements/images/image-product-mobile.jpg">
css
**When on desktop
#product-image-mobile {
display: none;
}
**when on mobile
#product-image-mobile {
display: block;
}
#product-image-desktop {
display: none;
}
You don't need to use javascript for this