Umbraco-CMS: BackOffice Crop alias not rendering as expected frontend - Exif Rotate not respected

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

v9.0.0

Bug summary

Backoffice: image

<img src="@Url.GetCropUrl(Model.People.Last().Value<IPublishedContent>("photo"), "Square")" /> image

adding a width <img src="@Url.GetCropUrl(Model.People.Last().Value<IPublishedContent>("photo"), cropAlias:"Square", width:200)" /> image

Specifics

No response

Steps to reproduce

Media with crops change focal point and change crop boundaries on a crop away from the focal point being centered and native size. Save and render frontend with the @Url.GetCrop()

Expected result / actual result

Backoffice and frontoffice renderings should be identical

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (18 by maintainers)

Most upvoted comments

@ronaldbarendse Just a couple of thoughts Are we sure we want to auto-orient all processed images? if the don’t mutate stands for the uploaded images then shouldn’t we maintain this on processed images too… only ensuring the correct calculations occur? 😉 I gave an example above where downloaded PR sets including processed and raw images might have inconsistent rotations for post-processing? Is a barrier here the reliance on URL based processing of images? (missing some functional capabilities of imagesharp)

This relates to the discussion here. https://github.com/umbraco/Umbraco-CMS/issues/2974

If we can find a foolproof way of fixing this issue then I’m all for it, but we need a comprehensive set of tests (even if just described manually with example images) so that we can actually cover all the scenario’s that are in play here.

It looks like we might be able to do the rotation on the server when we know the EXIF values, which will also make sure that width/height is set correctly. Then we need to also change the EXIF value once the rotation is done so the browser doesn’t get confused and rotates the image again based on the EXIF value. If we can then prove that it’s always done correctly in scenarios listed in https://github.com/umbraco/Umbraco-CMS/issues/2974 then that would be really excellent.