For this requirement, you can create a custom module. First, you have to add two images add two different divs's and add your images separately in that div. Now one div is for the desktop view and the second one is for the mobile. Now add display none class in mobile div. so that only desktop images displays.
Now you have to add the media query on 481px. where you have to display block the mobile div and display none the desktop. So that mobile image is display and desktop image not.
HTML CODE :-
<div class="cust-image">
<div class="desktop-image">
<img src="desktop-image">
</div>
<div class="mobile-image">
<img src="mobile-image">
</div>
</div>
CSS Code :- .mobile-image
{
display: none;
}
@media only screen and (max-width: 481px)
{
.mobile-image
{
display: block;
}
.desktop-image
{
display: none;
}
}
Hope this helps.
If we were able to answer your query, kindly help the community by marking it as a solution.
For this requirement, you can create a custom module. First, you have to add two images add two different divs's and add your images separately in that div. Now one div is for the desktop view and the second one is for the mobile. Now add display none class in mobile div. so that only desktop images displays.
Now you have to add the media query on 481px. where you have to display block the mobile div and display none the desktop. So that mobile image is display and desktop image not.
HTML CODE :-
<div class="cust-image">
<div class="desktop-image">
<img src="desktop-image">
</div>
<div class="mobile-image">
<img src="mobile-image">
</div>
</div>
CSS Code :- .mobile-image
{
display: none;
}
@media only screen and (max-width: 481px)
{
.mobile-image
{
display: block;
}
.desktop-image
{
display: none;
}
}
Hope this helps.
If we were able to answer your query, kindly help the community by marking it as a solution.