diff --git a/src/Umbraco.Core/Media/ImageHelper.cs b/src/Umbraco.Core/Media/ImageHelper.cs index 9cb44afb18..f2b848be57 100644 --- a/src/Umbraco.Core/Media/ImageHelper.cs +++ b/src/Umbraco.Core/Media/ImageHelper.cs @@ -165,6 +165,16 @@ namespace Umbraco.Core.Media ep.Param[0] = new EncoderParameter(Encoder.Quality, 90L); // Save the new image using the dimensions of the image + var predictableThumbnailName = thumbnailFileName.Replace("UMBRACOSYSTHUMBNAIL", maxWidthHeight.ToString(CultureInfo.InvariantCulture)); + using (var ms = new MemoryStream()) + { + bp.Save(ms, codec, ep); + ms.Seek(0, 0); + + fs.AddFile(predictableThumbnailName, ms); + } + + // TODO: Remove this, this is ONLY here for backwards compatibility but it is essentially completely unusable see U4-5385 var newFileName = thumbnailFileName.Replace("UMBRACOSYSTHUMBNAIL", string.Format("{0}x{1}", widthTh, heightTh)); using (var ms = new MemoryStream()) {