mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
8b440b051f
refs https://github.com/TryGhost/Team/issues/1652 refs https://github.com/TryGhost/Ghost/issues/13319 - Added support for animated webp and gifs optimization and resizing - Added optinal `format` option to `unsafeResizeFromBuffer` and `resizeFromBuffer`. E.g. allows you to convert a .svg file to a .png. - Added optional `animated` option to `unsafeResizeFromBuffer` and `resizeFromBuffer`. Defaults to 'maintain animation'. - Added optional `withoutEnlargement` option to `unsafeResizeFromBuffer` and `resizeFromBuffer`. Defaults to true. Required to increase SVG size. - Removed gif and svg from `canTransformFileExtension`. They are supported by sharp now. - Added `shouldResizeFileExtension` method, which returns if we should resize an image. This is required to prevent resizing SVG files (while it is supported, it is not desired), while allowing them to be converted to PNG (thats why a new method was needed). - Added `canTransformToFormat` to validate the `format` option. - Improved TS/JSDoc type inheritance when `makeSafe` is used. |
||
---|---|---|
.. | ||
utils | ||
.eslintrc.js | ||
transform.test.js |