Archived topic
Change image URL depending on screen size ?
7 replies · Started by Samuel on February 28, 2021
Hi,
Is it possible to change the branding image (logo) depending on screen size ?
I have a menu a little bit special, and I would like to use 2 different images : one for large screens and another for @media max-width:900px
Thanks for your help
Hi there,
can you share a link to the site where i can see the layout and i can see whats possible.
David, it was same site as my other topic. You'll find it in private information.
Now I decided to do other way but I'm still interested to know if this kind of things are possible and how to do it. ;-)
The simplest method would be to use the Mobile Header which has its own logo:
Yes obviously in that case it would have been an option, but I was talking like in general, is it possible to change an image url (not background-image) by css ?
No it's not possible to change an <img> URL using CSS. You would need to output both Images and then use CSS to hide / display each one.
Thank you David
You're welcome