diff --git a/ghost/core/core/boot.js b/ghost/core/core/boot.js index 504eb66f67..258bcfea19 100644 --- a/ghost/core/core/boot.js +++ b/ghost/core/core/boot.js @@ -310,6 +310,7 @@ async function initServices({config}) { const tagsPublic = require('./server/services/tags-public'); const postsPublic = require('./server/services/posts-public'); const slackNotifications = require('./server/services/slack-notifications'); + const mediaInliner = require('./server/services/media-inliner'); const urlUtils = require('./shared/url-utils'); @@ -346,7 +347,8 @@ async function initServices({config}) { comments.init(), linkTracking.init(), emailSuppressionList.init(), - slackNotifications.init() + slackNotifications.init(), + mediaInliner.init() ]); debug('End: Services'); diff --git a/ghost/core/core/server/services/media-inliner/service.js b/ghost/core/core/server/services/media-inliner/service.js new file mode 100644 index 0000000000..e30571cb93 --- /dev/null +++ b/ghost/core/core/server/services/media-inliner/service.js @@ -0,0 +1,16 @@ +module.exports = { + async init() { + const debug = require('@tryghost/debug')('mediaInliner'); + + this.api = { + // @NOTE: the inlining should become an offloaded job + // startMediaInliner: mediaInliner.inlineMedia + startMediaInliner: () => { + debug('[Inliner] Starting media inlining job'); + return { + status: 'success' + }; + } + }; + } +};