@Muhammad-adam778
Posted
Try to add the two images to the page at the same time, but one of them should be display: none;
(to be hidden) and the other should be display: inline
(to be visible), if you are in desktop the desktop image is display: inline;
and if you in mobile the mobile image should be display: inline
.
to make that check this css code below:
/*Small screens*/
@media (max-width: 767px) {
.mobile-img {
display: inline;
}
.desktop-img {
display: none;
}
}
/*Large screens*/
@media (min-width: 768px) {
.mobile-img {
display: none;
}
.desktop-img {
display: inline;
}
}