Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCropUrl() not taking focal point, zoom or width/height into consideration #11098

Closed
bjornnorlen opened this issue Sep 14, 2021 · 2 comments
Closed

Comments

@bjornnorlen
Copy link

Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8

Umbraco version 9.0.0-rc001

Bug summary

The method GetCropUrl() doesn't work properly since it doesn't take focal points or zooming into considerations. It also seems like the width/height properties are mixed up.

Specifics

Umbraco version 9.0.0-rc001
Tested in Edge and Chrome

Creating settings for the picker:
image

Cropping the image in the content-section. The first image should be cropped so the top of the trees are visible. The second image is zooming in on the cars. The third image is cropped to the right and has a width of 200px and a height of 400px:
image

The images rendered on the front-end. The first image isn't showing the top of the trees, the second image doesn't zoom and the third image has the width/height properties mixed up:
image

The code used for rendering:
image

Also, according to #10747 the method GetLocalCropUrl() is obsolete and if that's the case the documentation with examples for the picker might need an update: https://our.umbraco.com/Documentation/Fundamentals/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker-3/index-v9.

Steps to reproduce

  • Create a document type
  • Add the media picker editor (not the legacy one)
  • Enable focal point and define crops
  • Render the crops with GetCroptUrl()

Expected result / actual result

Expecting that the images are cropped according to focal point, zoom and width/height properties defined.

@nul800sebastiaan
Copy link
Member

Sorry that you went through all the trouble making this big bug report @bjornnorlen - we have fixed the cropping issues in the latest RC003 and I would encourage you to try that one instead. Next time you notice a bug do make sure you're on the latest version, things are moving fast at the moment 🙈

@bjornnorlen
Copy link
Author

@nul800sebastiaan Thanks for the fast reply :) I was looking for a way to upgrade but didn't find how to do it until I found this: https://our.umbraco.com/Documentation/Fundamentals/Setup/Upgrading/general-v9. I've upgraded to rc003 but it's failing to install (getting a MissingMethodException). I'll see if I can resolve it or find any posts about it, otherwise I'll create an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants