@cbserra
Posted
You could use the <picture> element, which allows you to specify @media queries for image sources.
Also, I found it easier and cleaner to develop my layout for mobile -- so the default CSS is targeting a mobile layout. That way, I only need a media query for additional breakpoints I will support. It looks like there's a large range between your breakpoints -- you have one for max-width of 541px and the other one is for min-width of over 1000px -- which leaves both images visible for at least one breakpoint between the two you support.