Created
March 30, 2025 17:06
-
-
Save henshaw/071a09283eda3760216b21d06d0d395d to your computer and use it in GitHub Desktop.
Coywolf logo swap using the image srcset property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<picture> | |
<source media="(max-width: 39rem)" srcset="https://coywolf.pro/wp-content/themes/coywolf-v2/images/coywolf-white.svg" width="60" height="52"> | |
<source media="(min-width: 40rem)" srcset="https://coywolf.pro/wp-content/themes/coywolf-v2/images/coywolf-horizontal-logo.svg" width="287" height="52"> | |
<img src="https://coywolf.pro/wp-content/themes/coywolf-v2/images/coywolf-white.svg" loading="eager" alt="Paint color swatches" width="60" height="52"> | |
</picture> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Referenced in the article: Why you should do more than resizing images with the srcset property