v10: Update to ImageSharp v2 (#12185)
* Update to ImageSharp 2.1.0 and ImageSharp.Web 2.0.0-alpha.0.23 * Rename CachedNameLength to CacheHashLength and add CacheFolderDepth setting * Replace PhysicalFileSystemProvider with WebRootImageProvider * Support EXIF-orientation in image dimention extractor * Remove virtual methods on FileProviderImageProvider * Simplify FileInfoImageResolver * Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.25 and remove custom providers * Make CropWebProcessor EXIF orientation-aware * Improve width/height sanitization * Also use 'v' as cache buster value * Add WebP to supported image file types * Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.27 and fix test * Fix rounding error and add test cases * Update to newest and stable releases * Move ImageSharpImageUrlGenerator to Umbraco.Web.Common * Use IConfigureOptions to configure ImageSharp options * Implement IEquatable on ImageUrlGenerationOptions classes * Fix empty/null values in image URL generation and corresponding tests * Use IsSupportedImageFormat extension method * Remove unneeded reflection
This commit is contained in:
@@ -14,8 +14,9 @@ namespace Umbraco.Cms.Core.Configuration.Models
|
||||
{
|
||||
internal const string StaticBrowserMaxAge = "7.00:00:00";
|
||||
internal const string StaticCacheMaxAge = "365.00:00:00";
|
||||
internal const int StaticCachedNameLength = 8;
|
||||
internal const string StaticCacheFolder = Constants.SystemDirectories.TempData + "/MediaCache";
|
||||
internal const int StaticCacheHashLength = 12;
|
||||
internal const int StaticCacheFolderDepth = 8;
|
||||
internal const string StaticCacheFolder = Constants.SystemDirectories.TempData + "/MediaCache";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the browser image cache maximum age.
|
||||
@@ -30,13 +31,19 @@ namespace Umbraco.Cms.Core.Configuration.Models
|
||||
public TimeSpan CacheMaxAge { get; set; } = TimeSpan.Parse(StaticCacheMaxAge);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for length of the cached name.
|
||||
/// Gets or sets a value for the image cache hash length.
|
||||
/// </summary>
|
||||
[DefaultValue(StaticCachedNameLength)]
|
||||
public uint CachedNameLength { get; set; } = StaticCachedNameLength;
|
||||
[DefaultValue(StaticCacheHashLength)]
|
||||
public uint CacheHashLength { get; set; } = StaticCacheHashLength;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the cache folder.
|
||||
/// Gets or sets a value for the image cache folder depth.
|
||||
/// </summary>
|
||||
[DefaultValue(StaticCacheFolderDepth)]
|
||||
public uint CacheFolderDepth { get; set; } = StaticCacheFolderDepth;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the image cache folder.
|
||||
/// </summary>
|
||||
[DefaultValue(StaticCacheFolder)]
|
||||
public string CacheFolder { get; set; } = StaticCacheFolder;
|
||||
|
||||
Reference in New Issue
Block a user