- 🐛 Fixed potentially squashed images in image cards - Kevin Ansfield
See the changelogs for Ghost and Ghost-Admin for the details of every change in this release.
Tag Name: 3.21.1
Release Date: 6/29/2020
GhostOpen-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.
This minor release addresses several critical image-related issues that were introduced in 3.21.0. The update fixes potentially squashed images in image cards by removing problematic width/height attributes, resolves image path handling in subdirectory setups, and improves the site URL handling for the members script. This is primarily a maintenance release focused on ensuring proper image display across all Ghost sites.
No migration steps are required for this update. This is a drop-in replacement that fixes bugs without introducing breaking changes or requiring configuration updates.
All Ghost users should upgrade to 3.21.1, especially those who:
This is a maintenance release that fixes bugs without introducing breaking changes, making it a safe and recommended upgrade for all installations.
Fixed an issue introduced in 3.21.0 where images in image cards could appear squashed or distorted. The previous version added width/height attributes to <img> elements output by image cards, which caused problems for sites whose CSS wasn't prepared for these attributes. This update removes these attributes by updating to a newer version of @tryghost/kg-default-cards.
Resolved an issue with the populateImageSizes function when using Ghost in subdirectory setups. Previously, images stored in the database without the subdirectory prefix weren't having the /content/images/ prefix properly removed when passed to the storage adapter. This resulted in the storage adapter failing to find the images. The fix ensures proper path handling regardless of how the image paths are stored.
Fixed interdependency issues between the populateImageSizes tests and routing tests. The problem occurred when clearing the cached url-utils require, which affected later tests that had stubbed urlUtils. The solution implements proper stubbing of urlUtils methods to prevent test failures.
No new features were introduced in this maintenance release. This version focuses exclusively on bug fixes and refactoring.
No security fixes were included in this release.
No specific performance improvements were included in this release. The changes were focused on bug fixes and code refactoring rather than performance enhancements.
Ghost 3.21.1 is a targeted bug fix release that addresses several image-related issues introduced in the previous version. The primary impact is on content display, ensuring that images render correctly in all contexts, particularly in image cards and subdirectory setups.
The refactoring of the site URL data attribute for the members script simplifies the implementation by using a direct data attribute on the script tag rather than requiring a separate meta tag. This change makes the code more maintainable and reduces potential points of failure.
Overall, this release improves the reliability of Ghost's image handling capabilities without introducing new features or breaking changes. Users should experience more consistent image display across their sites after upgrading.
See the changelogs for Ghost and Ghost-Admin for the details of every change in this release.