Account Deleted
Hello Coder🙂
your solution is great 🎉
But you used the wrong method to switch images and there are some better ways are available to handle the image switch problem
You can try <picture> tag to switch image
Picture tag :
<picture>
<source media="(min-width: 597px)"
srcset="./images/image-product-desktop.jpg ">
<source media="(min-width: 0px)"
srcset=" ./images/image-product-mobile.jpg">
<img src="./images/image-product-mobile.jpg" alt="Product_image">
</picture>
And I think you have a lot of doubt related to your solution that's why I recommend you to check out my solution✨ that will definitely going to help you 👀
I hope that will be helpful for you✌️