diff --git a/src/umbraco.editorControls/imagecropper/ImageInfo.cs b/src/umbraco.editorControls/imagecropper/ImageInfo.cs index 054b8f676c..6d142bf90e 100644 --- a/src/umbraco.editorControls/imagecropper/ImageInfo.cs +++ b/src/umbraco.editorControls/imagecropper/ImageInfo.cs @@ -33,9 +33,12 @@ namespace umbraco.editorControls.imagecropper //This get's the IFileSystem's path based on the URL (i.e. /media/blah/blah.jpg ) Path = _fs.GetRelativePath(relativePath); - + image = Image.FromStream(_fs.OpenFile(Path)); - Name = _fs.GetFileName(Path); + + var fileName = _fs.GetFileName(Path); + Name = fileName.Substring(0, fileName.LastIndexOf('.')); + DateStamp = _fs.GetLastModified(Path).Date; Width = image.Width; Height = image.Height; @@ -75,12 +78,10 @@ namespace umbraco.editorControls.imagecropper { crop = preset.Fit(this); } - - var tmpName = Name.Substring(0, Name.LastIndexOf('.')); - + ImageTransform.Execute( Path, - String.Format("{0}_{1}", tmpName, preset.Name), + String.Format("{0}_{1}", Name, preset.Name), crop.X, crop.Y, crop.X2 - crop.X,