0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/services
Kevin Ansfield 84724537be 🐛 Fixed feature images in emails appearing very wide in Outlook
closes https://github.com/TryGhost/Team/issues/675

Outlook will display images at their native resolution if no `width` attribute is supplied. Content images were fixed a while ago but feature images would still render very wide and cause horizontal scroll and text size/alignment issues.

- modify `post.feature_image` and add a `post.feature_image_width` property before passing it through to the email template
  - for Unsplash images we assume all images are larger than 600px so we change the URL to reference a 1200px image and set the image width to 600 (to keep images on retina displays crisp)
  - for other images we probe the image to fetch the original dimensions and give set an image width of 600 if needed, if it's a locally-hosted image we update the URL to point at a max 1200px version
- updated email template to output a `width` attribute on the feature image `<img>` tag if it's set
2021-05-14 11:57:37 +01:00
..
adapter-manager
auth Updated setup flow to rename default product 2021-05-10 13:59:00 +05:30
bulk-email Moved i18n to shared 2021-05-04 13:03:38 +01:00
email-analytics
invitations Moved i18n to shared 2021-05-04 13:03:38 +01:00
invites Moved i18n to shared 2021-05-04 13:03:38 +01:00
jobs
mail Fixed i18n being called outside of a function 2021-05-05 16:34:40 +01:00
mega 🐛 Fixed feature images in emails appearing very wide in Outlook 2021-05-14 11:57:37 +01:00
members 💡 Removed 401 error for logged-out member on Portal 2021-05-13 15:26:07 +05:30
notifications Moved i18n to shared 2021-05-04 13:03:38 +01:00
permissions Moved i18n to shared 2021-05-04 13:03:38 +01:00
settings Expanded requires of lib/common i18n and events 2021-05-03 17:14:52 +01:00
themes Moved package-json wrapper outside implementation folder 2021-05-06 12:56:21 +01:00
webhooks Expanded requires of lib/common i18n and events 2021-05-03 17:14:52 +01:00
labs.js Moved i18n to shared 2021-05-04 13:03:38 +01:00
limits.js Added support for max periodic limit check 2021-05-07 18:43:47 +04:00
oembed.js
slack.js Moved i18n to shared 2021-05-04 13:03:38 +01:00
users.js
xmlrpc.js Moved i18n to shared 2021-05-04 13:03:38 +01:00