0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Fixed responsive images for .icos

closes #10301

- we allow .ico files for icons, but we cannot resize these specialist files at present
This commit is contained in:
Hannah Wolfe 2019-01-15 17:40:09 +00:00
parent 0d8aa92e68
commit d58ecda9a9
2 changed files with 7 additions and 1 deletions

View file

@ -40,7 +40,7 @@ const unsafeResizeImage = (originalBuffer, {width, height} = {}) => {
// as there has been support added in underlying libvips library https://github.com/lovell/sharp/issues/1372
// As for .svg files, sharp only supports conversion to png, and this does not
// play well with animated svg files
const canTransformFileExtension = ext => !['.gif', '.svg', '.svgz'].includes(ext);
const canTransformFileExtension = ext => !['.gif', '.svg', '.svgz', '.ico'].includes(ext);
const makeSafe = fn => (...args) => {
try {

View file

@ -31,6 +31,12 @@ describe('lib/image: manipulator', function () {
false
);
});
it('returns false for ".ico"', function () {
should.equal(
manipulator.canTransformFileExtension('.ico'),
false
);
});
});
describe('cases', function () {