Last active
October 28, 2019 14:22
-
-
Save leigler/b592503c2c8c8706fa9d7772dae8dcc4 to your computer and use it in GitHub Desktop.
image_srcset for Kirby
This file contains 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
<img | |
class="header_image img_preload" | |
title="<?= $image->toFile()->title() ?>" | |
alt="<?= $image->toFile()->title() ?>" | |
srcset="<?= $image->toFile()->resize(700)->url() ?> 700w, | |
<?= $image->toFile()->resize(1400)->url() ?> 1400w" | |
sizes="(min-width: 768px) 80vw, 100vw" | |
src="<?= $image->toFile()->url()?>" | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment