flokosiol / kirby-focus

Better image cropping for Kirby CMS
184 stars 14 forks source link

focusCrop does not work with srcset #46

Closed gearsdigital closed 4 years ago

gearsdigital commented 4 years ago

Not sure if this works as expected but I figured that focusCrop does not work with srcset.

This works:

<?php foreach ($page->children()->listed() as $member): ?>
    <?= $member->image()->focusCrop(300, 400)->url(); ?>
<?php endforeach ?>

This does not...

<?php foreach ($page->children()->listed() as $member): ?>
    <?= $member->image()->focusCrop(300, 400)->srcset(); ?>
<?php endforeach ?>

This code is based on https://getkirby.com/docs/reference/panel/samples/team

gearsdigital commented 4 years ago

Nevermind. I better should've RTFM, right? https://github.com/flokosiol/kirby-focus#focus-and-srcset-becomes-focussrcset

facepalm

flokosiol commented 4 years ago

No problem. Thanks for using the plugin!