mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
eef85bba90
refs https://sharp.pixelplumbing.com/api-utility#cache - Sharp has a 50MB cache by default, used within libvips, to increase the performance of transforming images - this isn't relevant to us because we should never be optimizing the same image as we check if the optimized image already exists - I presume there is also some extra overhead of using the cache because the memory doesn't seem to grow by 50MB - the memory usage comparison in Ghost is pretty drastic - uploading 10 images in serial w/ jemalloc: - with cache (default) = peak of 480MB, settles down to 330MB - disabling cache = peak of 270MB, settles down to 161MB - this commit disables the cache - also adds stubbing for the function in tests |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
Image Transform
Install
npm install @tryghost/image-transform --save
or
yarn add @tryghost/image-transform
Usage
Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2013-2021 Ghost Foundation - Released under the MIT license.