Can't Find modal-post-preview Handlebars File

I am running Ghost 4.7.0 on a localhost development instance, installed via npm.
Ghost-CLI version 1.17.3
Windows 10 / Chrome

I’m trying to set my newsletter up so that I use featured images on the mobile and browser versions, but omit the image from the email because I don’t want to send images to people’s emails, but I can’t figure out how to remove them because I can’t seem to find a relevant handlebars file. I’m looking at the minified javascript:

const l=Ember.HTMLBars.template({id:"id1QuykW",block:'{"symbols":["@model"],"statements":[[10,"div"],[14,0,"flex flex-column h-100"],[12],[2,"\\n "],[10,"header"],[14,0,"modal-header gh-post-preview-header gh-post-preview-header-border"],[12],[2,"\\n "],[10,"div"],[12],[2,"\\n "],[11,"button"],[24,0,"gh-editor-back-button"],[24,"title","Close"],[4,[38,3],["click",[32,0,["close"]]],null],[12],[2,"\\n "],[10,"span"],[12],[1,[30,[36,4],["arrow-left"],null]],[2," Back"],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"gh-post-preview-btn-group"],[12],[2,"\\n "],[10,"div"],[14,0,"gh-contentfilter gh-btn-group"],[12],[2,"\\n "],[11,"button"],[16,0,[31,["gh-btn ",[30,[36,1],[[30,[36,0],[[32,0,["tab"]],"browser"],null],"gh-btn-group-selected"],null]," gh-post-preview-mode"]]],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["changeTab"]],"browser"],null]],null],[12],[10,"span"],[12],[1,[30,[36,4],["desktop"],null]],[13],[13],[2,"\\n "],[11,"button"],[16,0,[31,["gh-btn ",[30,[36,1],[[30,[36,0],[[32,0,["tab"]],"mobile"],null],"gh-btn-group-selected"],null]," gh-post-preview-mode"]]],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["changeTab"]],"mobile"],null]],null],[12],[10,"span"],[12],[1,[30,[36,4],["mobile-phone"],null]],[13],[13],[2,"\\n"],[6,[37,1],[[32,1,["post","isPost"]]],null,[["default"],[{"statements":[[2," "],[11,"button"],[16,0,[31,["gh-btn ",[30,[36,1],[[30,[36,0],[[32,0,["tab"]],"email"],null],"gh-btn-group-selected"],null]," gh-post-preview-mode"]]],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["changeTab"]],"email"],null]],null],[12],[10,"span"],[12],[1,[30,[36,4],["email-unread"],null]],[13],[13],[2,"\\n"]],"parameters":[]}]]],[2," "],[11,"button"],[16,0,[31,["gh-btn ",[30,[36,1],[[30,[36,0],[[32,0,["tab"]],"social"],null],"gh-btn-group-selected"],null]," gh-post-preview-mode"]]],[24,4,"button"],[4,[38,3],["click",[30,[36,2],[[32,0,["changeTab"]],"social"],null]],null],[12],[10,"span"],[12],[1,[30,[36,4],["twitter"],null]],[13],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n\\n "],[8,"gh-publishmenu",[],[["@post","@postStatus","@saveTask","@setSaveType","@memberCount","@uiContext"],[[32,1,["post"]],[32,1,["post","status"]],[32,1,["saveTask"]],[32,1,["setEditorSaveType"]],[32,1,["memberCount"]],"preview"]],null],[2,"\\n "],[13],[2,"\\n\\n"],[6,[37,1],[[30,[36,0],[[32,0,["tab"]],"browser"],null]],null,[["default"],[{"statements":[[2," "],[8,"modal-post-preview/browser",[],[["@post"],[[32,1,["post"]]]],null],[2,"\\n"]],"parameters":[]}]]],[2,"\\n"],[6,[37,1],[[30,[36,5],[[30,[36,0],[[32,0,["tab"]],"mobile"],null],[32,1,["post","isPost"]]],null]],null,[["default"],[{"statements":[[2," "],[8,"modal-post-preview/mobile",[],[["@post"],[[32,1,["post"]]]],null],[2,"\\n"]],"parameters":[]}]]],[2,"\\n"],[6,[37,1],[[30,[36,5],[[30,[36,0],[[32,0,["tab"]],"email"],null],[32,1,["post","isPost"]]],null]],null,[["default"],[{"statements":[[2," "],[8,"modal-post-preview/email",[],[["@post"],[[32,1,["post"]]]],null],[2,"\\n"]],"parameters":[]}]]],[2,"\\n"],[6,[37,1],[[30,[36,0],[[32,0,["tab"]],"social"],null]],null,[["default"],[{"statements":[[2," "],[8,"modal-post-preview/social",[],[["@post"],[[32,1,["post"]]]],null],[2,"\\n"]],"parameters":[]}]]],[13]],"hasEval":false,"upvars":["eq","if","fn","on","svg-jar","and"]}',meta:{moduleName:"ghost-admin/components/modal-post-preview.hbs"}})

but I can’t find anything resembling modal-post-preview.hbs in any of my files or on the github repo for ghost. I’m kind of assuming it’s getting automatically generated somewhere, but does anybody have an example of a relevant handlebars file or know where I can find one? I know it’s possible to segregate out the styling because all the “related posts” stuff doesn’t show up on the email preview like it does the mobile preview.

Thanks!

The code you’re looking at is only for the Admin client, which does not do any of the work for generating emails. The Admin client is basically a UI to tweak newsletter settings, while the Ghost Core (which you linked to) does all of the newsletter email generation.

:warning: :warning: :warning:
Making changes to the Ghost core is not recommended, because you will lose your changes between upgrades, and it effectively locks you to that version

The Email Template serialization is done in /core/server/services/mega/post-email-serializer.js and the email template itself is in /core/server/services/mega/template.js

If you upgrade your Ghost version there’s an option for this. It was added in 4.8.0.

AHA! That’s perfect, thank you. Sorry, I thought I was on the newest version but I think I misunderstood where the version updates are posted. Still getting my feet wet with all this, but I’m definitely making progress :slight_smile: