<p>I know about <code>getPhotoUrl(size</code>) but this always gives me a square. Is there any way of scaling/cropping the user photo? Let's say I want the photo 100x50, would that be possible? By looking at the code I think it's not, so the only option I can think of is every time the <code>onBeforeSaveUser</code> is triggered, I mirror the user photo to an asset field. Any better ideas? </p>

CC BY-SA 3.0
2015-09-03T06:18:24.703Z
Brandon or Brad mentioned plan for Craft 3 was to make it a 'proper' asset...so you'll certainly be able to then...
Jeremy Daalder
CC BY-SA 3.0
2015-09-03T07:06:46.693Z
great news to here, but I'm more looking more for a solution right now :)  Worst case I'll go with the event solution, I just wanted to see if anyone has come up with a better solution yet...
Sidney Widmer
<image><image-transforms><user-profile>
Resize User Photo
# Resize User Photo

(Asked by: username_0 on 2015-09-03)

I know about `getPhotoUrl(size`) but this always gives me a square. Is there any way of scaling/cropping the user photo? Let's say I want the photo 100x50, would that be possible? By looking at the code I think it's not, so the only option I can think of is every time the `onBeforeSaveUser` is triggered, I mirror the user photo to an asset field. Any better ideas?

**Tags:** image, image-transforms, user-profile
> **Comments:**
> **username_1**: Brandon or Brad mentioned plan for Craft 3 was to make it a 'proper' asset...so you'll certainly be able to then...  
> **username_0**: great news to here, but I'm more looking more for a solution right now :)  Worst case I'll go with the event solution, I just wanted to see if anyone has come up with a better solution yet...  

---

## 0 answers

