Home

>

Tools

>

Ghost

>

Releases

>

3.20.1

Ghost Release: 3.20.1

Tag Name: 3.20.1

Release Date: 6/17/2020

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost 3.20.1: Improved Bookmark Embeds and Image Handling

This minor release fixes a critical issue with bookmark cards for sites that require cookies during redirects (like Medium), preventing infinite redirect loops. It also adds functionality to populate missing image sizes on forced re-renders, improving the display of images in posts. This update enhances the reliability of content embedding and image handling in Ghost.

Highlight of the Release

    • Fixed bookmark card creation for sites using cookie-based redirects (like Medium)
    • Added functionality to populate missing image sizes on forced re-renders
    • Improved image handling with optimized image dimension reading

Migration Guide

No migration steps are required for this update. This is a minor release that can be installed with standard update procedures.

Upgrade Recommendations

This update is recommended for all Ghost users, especially those who:

  1. Create bookmark cards for Medium articles or other sites that use cookie-based redirects
  2. Work with image-heavy content where proper image sizing is important

The update addresses specific issues with bookmark card creation and image handling, improving the overall reliability of the platform. As a minor patch release (3.20.0 → 3.20.1), the upgrade should be straightforward with minimal risk.

Bug Fixes

  • Fixed bookmark card creation for sites requiring cookies during redirects: Resolved an issue where creating bookmark cards for sites like Medium would fail due to infinite redirect loops. The fix implements got's cookie support via tough-cookie to properly handle redirects that require cookies.

  • Fixed test behavior issues: Resolved unexpected behavior in tests that run after the cached-image-size-from-url_spec.js unit tests by fixing non-reverted rewire of imageSize.getImageSizeFromUrl.

  • Fixed no-shadow linter warnings: Addressed linter warnings in the image-size.js file to improve code quality.

New Features

New Image Size Population Feature

A new populateImageSizes() function has been added to the mobiledoc library module that:

  • Uses the image-size library to efficiently read image dimensions
  • Applies proper handling for local images using the storage adapter with the same guards as the handle-image-sizes middleware
  • For Unsplash images, removes width and crop parameters to ensure the full-size image is referenced
  • Automatically modifies post model's mobiledoc when re-rendering to ensure all images have proper size information

Security Updates

No specific security fixes were included in this release.

Performance Improvements

  • Optimized image dimension reading: The new image size population feature uses the image-size library for faster reading of image dimensions, which improves performance when handling multiple images.

  • Improved handling of Unsplash images: The system now removes width and crop parameters from Unsplash image URLs to point to the full-size image, optimizing the image processing workflow.

Impact Summary

Ghost 3.20.1 delivers important fixes and enhancements that improve content creation workflows. The bookmark card fix resolves a frustrating issue where creating cards for Medium articles and similar sites would fail due to redirect handling problems. The new image size population feature ensures that all images display with proper dimensions, even when posts are re-rendered.

These changes primarily benefit content creators by making the platform more reliable when working with external content and images. The code quality improvements and optimized image handling also provide a more stable foundation for developers working with the Ghost platform.

While this is a minor release, the fixes address specific pain points that could significantly impact content creation workflows, making it a worthwhile update for all Ghost installations.

Full Release Notes

  • 🐛 Fixed embed/bookmark retrieval for sites that require cookies during redirects - Kevin Ansfield

See the changelogs for Ghost and Ghost-Admin for the details of every change in this release.

Statistics:

File Changed10
Line Additions178
Line Deletions16
Line Changes194
Total Commits6

User Affected:

  • Can now successfully create bookmark cards for Medium articles and other sites that use cookie-based redirects
  • Will see improved image rendering with proper dimensions when re-rendering posts

Contributors:

kevinansfielddaniellockyer