Archived topic
Showing a different hero image on mobile or desktop/tablet
1 reply · Started by sevite on June 15, 2021
Hi there,
My objective is to be able to display a full-width hero image on desktop and tablet and a cropped narrower version on mobile.
I think this may have worked using "hide-on-mobile" or "hide-on-desktop hide-on-tablet" could you check for me and possibly advise if there is a better way? I used two different pics just to be sure it was working as I hoped. The hide-on-desktop one is a background on a full-width container and the hide-on-mobile one is a full-width image block in full-width container. Thanks for advice on any preferred ways to do this or recommeded size (thumbnail, medium, medium-large, large) for these two purposes.
https://signmaps.org/clone-2/scientists-join-maps-coalition/
Thanks,
Pam
Hi Pam,
This solution certainly work.
However, it isn't great for the performance as the hide-on class is just using CSS so both images are actually getting loaded on desktop and mobile.
I would say try to find an image that works in all responsive screens. If not then this solution is good :)