U4-4376 - Media Picker preview shows wrong image (7.1.0 Beta)

Created by Jeroen Breuer 10 Mar 2014, 15:22:05 Updated by Jeroen Breuer 13 May 2015, 14:40:37

Relates to: U4-4479

I've added the Image Cropper to the Image Media Type. When selecting media with the Media Picker I get the uploaded image from the Image Cropper streched. After refreshing the page it showed the correct image so it's probably a cache problem. See attachments.

4 Attachments

Comments

Robert Foster 15 Mar 2014, 03:37:09

I've also noted that an edited crop (zoomed in for example) doesn't look the same rendered on a page as it is in the preview. See attached examples of editing and front-end rendered.

Note that the cropped area (image #2) is higher up in the image than the preview and edited version (image #1). Editing was done in Firefox as it's broken in IE.


Jeroen Breuer 19 Mar 2014, 16:42:51

After reading my issue again it might not be completely clear. I've got the default upload datatype on the media picker and added the Image Cropper datatype extra. So it has 2 options to upload. After uploading on the Image Cropper datatype that image is displayed in the media picker preview, but after refreshing the page it shows the image of the orginial upload datatype as a preview.


Shannon Deminick 24 Mar 2014, 04:47:43

Media really only works based on a single property type called umbracoFile as a convention. The cropper is kind of meant as a complete replacement for the upload field as well (you can just change your property type from upload -> cropper and it will just work).

What is the property type names for both your upload field and your cropper?


Jeroen Breuer 24 Mar 2014, 05:55:20

The upload property type name was unchanged (umbracoFile) and the Image Cropper property type name is cropper.

I just tried to use the Image Cropper the same way as it was in v6.

Why does it work differently now?


Shannon Deminick 24 Mar 2014, 06:34:02

Because it is much nicer to have the cropper as the uploader as well. Now you just have one property editor that does it all and you can just swap them, it also means data is stored consistently and is nicer to use on the front-end. The cropper before now has been less than ideal which I'm sure you are aware of.


Jeroen Breuer 24 Mar 2014, 08:27:21

I know the previous cropper was less than ideal. Had to make quite a few hacks in DAMP to make it work the way I wanted.

Using the cropper as the uploader is a nice solution, but perhaps it should be made more obvious. A lot of people will probably try to use it the same as the v6 Image Cropper and might become confused. So maybe add a description to the Image Cropper datatype that it's supposed to be used as a replacement for the Upload datatype.


Sebastiaan Janssen 24 Mar 2014, 08:39:04

@jbreuer Let's not add messages about legacy behavior in the backoffice, it will only confuse new users. "old" users will adapt soon enough, we'll blog it with the final release.


Jeroen Breuer 24 Mar 2014, 08:53:03

No problem. There will probably be questions about it on the forum so I can earn some extra karma by pointing them to that blog ;-).


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.0

Due in version:

Sprint:

Story Points:

Cycle: