User avatar resizing

Nowadays i’m working on Kirby users section and i need some features that doesnt included yet :smile:

Now, i want to resize user avatar multi sizes. For ex: on homepage, on listing and profile page.

I tried following:

site()->user('johndoe')->avatar()->resize(400, 300);

and get:

Fatal error: Call to undefined method Media::resize() in

Will i open new feature request on GitHub for that issue? :wink:

Possible method like that?

site()->user('johndoe')->avatar(400, 300);

Great idea! I think a simpler and more consistent fix would be to move the new image modification methods to the Media class itself. I have opened an issue on GitHub.

Thanks @lukasbestle , i will waiting new media generation :thumbsup:

Aaand… it is already implemented and will be in the next Kirby release.

2 Likes

@lukasbestle you’re perfect!

Great news @lukasbestle !