From 814f7ac6fb6101198d265a5ed819b0aa7e859aa1 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Fri, 24 Mar 2023 10:17:43 +0100 Subject: [PATCH] Updated latest posts feature image resolution to 100x100 refs https://github.com/TryGhost/Team/issues/2675 Updated resolution to be square and 100x100 (200x200 actual to have retina). --- ghost/core/core/shared/config/overrides.json | 2 +- ghost/email-service/lib/email-renderer.js | 2 +- .../lib/email-templates/partials/latest-posts.hbs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghost/core/core/shared/config/overrides.json b/ghost/core/core/shared/config/overrides.json index 519ce428fb..2d9e8cb8d9 100644 --- a/ghost/core/core/shared/config/overrides.json +++ b/ghost/core/core/shared/config/overrides.json @@ -122,7 +122,7 @@ "internalImageSizes": { "icon": {"width": 256, "height": 256}, "email-header-image": {"width": 1200}, - "email-latest-posts-image": {"width": 240, "height": 192}, + "email-latest-posts-image": {"width": 200, "height": 200}, "email-latest-posts-image-mobile": {"width": 1200, "height": 960} } } diff --git a/ghost/email-service/lib/email-renderer.js b/ghost/email-service/lib/email-renderer.js index da32cae7f4..98bbfa1525 100644 --- a/ghost/email-service/lib/email-renderer.js +++ b/ghost/email-service/lib/email-renderer.js @@ -780,7 +780,7 @@ class EmailRenderer { for (const latestPost of data) { // Please also adjust email-latest-posts-image if you make changes to the image width (100 x 2 = 200 -> should be in email-latest-posts-image) - const {href: featureImage, width: featureImageWidth, height: featureImageHeight} = await this.limitImageWidth(latestPost.get('feature_image'), 120, 96); + const {href: featureImage, width: featureImageWidth, height: featureImageHeight} = await this.limitImageWidth(latestPost.get('feature_image'), 100, 100); const {href: featureImageMobile, width: featureImageMobileWidth, height: featureImageMobileHeight} = await this.limitImageWidth(latestPost.get('feature_image'), 600, 480); latestPosts.push({ diff --git a/ghost/email-service/lib/email-templates/partials/latest-posts.hbs b/ghost/email-service/lib/email-templates/partials/latest-posts.hbs index 329b4c9886..113903bf80 100644 --- a/ghost/email-service/lib/email-templates/partials/latest-posts.hbs +++ b/ghost/email-service/lib/email-templates/partials/latest-posts.hbs @@ -2,7 +2,7 @@
- + {{#if ../latestPostsHasImages}} @@ -28,7 +28,7 @@ {{#if ../latestPostsHasImages}} {{#if featureImage}} -
+