mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
🐛 Fixed logs showing an error when sending an email with no feature image
no issue - we were attempting to read an image file to determine it's dimensions when no feature image was set. This wasn't a fatal error as it was handled gracefully and had no ill consequences but it was adding confusing errors to the logs
This commit is contained in:
parent
84bfbae282
commit
a87410ef28
1 changed files with 23 additions and 21 deletions
|
@ -155,6 +155,7 @@ const serialize = async (postModel, options = {isBrowserPreview: false, apiVersi
|
|||
|
||||
// Outlook will render feature images at full-size breaking the layout.
|
||||
// Content images fix this by rendering max 600px images - do the same for feature image here
|
||||
if (post.feature_image) {
|
||||
if (isUnsplashImage(post.feature_image)) {
|
||||
// Unsplash images have a minimum size so assuming 1200px is safe
|
||||
const unsplashUrl = new URL(post.feature_image);
|
||||
|
@ -181,6 +182,7 @@ const serialize = async (postModel, options = {isBrowserPreview: false, apiVersi
|
|||
logging.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const templateSettings = {
|
||||
showSiteHeader: settingsCache.get('newsletter_show_header'),
|
||||
|
|
Loading…
Add table
Reference in a new issue