Using images in Ghost just got a whole lot better with instant image optimisation, responsive image galleries and API improvements!
The Ghost team just spent a week in the Canary Islands on our bi-annual team retreat. During these retreats our remote team gets together in person to collaborate, have fun, and make plans for the coming months. This time we also shipped several new features which we're excited to share.
We always made it a seamless experience to drop single images into your content on a Ghost publication, but from there onwards there was no optimisation of any kind. It can be painful to manually optimise each image before using it in your post, so we've finally introduced one of our most requested features: automatic image optimisation.
Now when you insert images into your post or page, Ghost will automatically resize and optimise your images with lossless compression. The end result is the same high quality images fully optimised for the web, without any extra effort on your part 🎉
With the recent launch of Ghost 2.0, we introduced the ability to select from three different image widths in posts for single images, allowing for more creative visual direction in your posts. The addition of image galleries extends this even further with responsive galleries for up to 9 images at a time.
Here's what a gallery looks like:
This unlocks a lot of potential for storytelling with images using Ghost. What's more, the dynamic gallery card will responsively optimise and organise your images to look their best, no matter how many images you choose to add or remove.
Galleries can be inserted by using the gallery card from the dynamic menu.
Alongside these new image features we've also made some improvements to the Ghost API, which now comes with a query parameter to always return absolute image URLs. This makes it a lot easier to work with - no more manual string concatenation! Read more about absolute URLs in the docs.
Ghost(Pro) users have already been updated and have access to image galleries and image optimisation within the editor. Self hosted developers can use Ghost-CLI to get this feature by running
$ ghost update to install the latest release.
Galleries require some CSS and JS in your theme to function correctly. Read more about implementing galleries in the theme documentation.