Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have upgraded Umbraco from 7.2.4 to 7.2.6
I have Slimsy 1.1.5 installed - both before and now, but somehow the GetResponsiveCropUrl method in Slimsy seems to return a different image src than before.
This is the code I have in my razor view, which is the same as before:
<img src="@Model.Content.GetResponsiveCropUrl("normal", "profilePhoto")" alt="" class="profile-photo" />
Before, in 7.2.4 it returned this image and src:
now after upgrade to Umbraco 7.2.6 the src is and the image is different:
I wonder why it is different now? .. before the src url had mode=crop and center=0.49333333333333335,0.5275 .. now these parameters are not added, but instead it has cropmode=percentage .. any idea why this happens?
The first image is from live and the second is from development - so the focal points might not have exactly same positions, but the are located in the center and the images uploaded are the same.
I think there are two things going on here, the first one is that while you are are requesting a predefined crop, in your first example this hasn't been set so it's falling back to the focal point, in the second example, the predefined crop has been set. The second thing is that it seems that your upgrade to Umbraco v7.2.6 has deregistered ImageProcessor from your Web.Config.
Could you try requesting /media/1001/_mg_9991.jpg?width=100 and see if it returns a resized image or not...?
If not could you post your web.config here (removing any passwords)?
The ImageProcessor is registered in web.config .. but I just noticed that I saw this when I entered "edit mode" for the defined crop (220x220px, alias=normal). (7.2.6)
compared to "edit mode" live (7.2.4).
Actually the "edit mode" (7.2.4) here didn't seem to match exactly how the first view was:
However after dragging the image in "edit mode" a bit to the left and save, the "edit mode" seems to be updated (7.2.4). It might be because it not has been re-saved from previously upgrades.
Back to the development (7.2.6) ... after I dragged scaled and dragged the image in "edit mode" and saving it - it seems to be updated:
It seems that something (maybe in the cache?) not was updated and the defined crop needed to be dragged a bit and saved to be updated - it was not enough just to save & publish the page in first place. I needed to "touch" the defined crop too.
and /media/1001/_mg_9991.jpg?width=100 works fine too.. so I just think this was because the crop wasn't updated - but I think it should when you publish the page an the preview of the crop seemed to be right.
I also noticed that the zoom-slider doesn't seem to update the image-crop preview properly, when you e.g. drag it to the end point and back to the start point in the slider - sometimes it has a bit delay and first update the crop-preview after click on the white background or start dragging the image. You should be able to reproduce it if the drag the slider fast to end point and back to start point, where you might still see the zoomed image.
@Jeavon - have a related question. Where does the cropmode=percentage come from? I don't see it in the Umrbaco code for getting a CropUrl in 7.2.8 https://github.com/umbraco/Umbraco-CMS/blob/7.2.8/src/Umbraco.Web/ImageCropperTemplateExtensions.cs
And I don't see it working if you parse in a new cropmode - it is still percentage. Do you have any idea of this??
It comes from here https://github.com/umbraco/Umbraco-CMS/blob/2029bef6eb8b2a831f55349015dae8e5c902dfb3/src/Umbraco.Web/ImageCropperBaseExtensions.cs#L97
I'm not sure I understand what you mean by parsing in a new cropmode, could you post your parameters?
Ahh - THANKS!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted