Ghost/core/server/lib/image/image-utils.js
Hannah Wolfe 0bdaa216e5
Refactored tpl to never be used in DI
- Ghost has a set of core packages that it is safe to require directly in any file - tpl is one of them!
- This keeps the DI signature smaller and easier to reason about
2021-10-11 15:19:54 +01:00

16 lines
710 B
JavaScript

const BlogIcon = require('./blog-icon');
const CachedImageSizeFromUrl = require('./cached-image-size-from-url');
const Gravatar = require('./gravatar');
const ImageSize = require('./image-size');
class ImageUtils {
constructor({config, logging, urlUtils, settingsCache, storageUtils, storage, validator, request}) {
this.blogIcon = new BlogIcon({config, urlUtils, settingsCache, storageUtils});
this.imageSize = new ImageSize({config, storage, storageUtils, validator, urlUtils, request});
this.cachedImageSizeFromUrl = new CachedImageSizeFromUrl({logging, imageSize: this.imageSize});
this.gravatar = new Gravatar({config, request});
}
}
module.exports = ImageUtils;