v5.13 Release Notes
Welcome to gatsby@5.13.0
release (December 2023 #1)
Key highlight of this release:
Also check out notable bugfixes.
Bleeding Edge: Want to try new features as soon as possible? Install gatsby@next
and let us know if you have any issues.
Custom Image and File CDN URL generators
gatsby@4.10.0
introduced Image CDN capability for Gatsby users. For best build performance, it requires a deployed site to handle image transformations at request time instead of at build time. Until now, handling those requests required supporting the specific URL format produced by Gatsby. With this release, we’re introducing support for custom URL generators that allow you to use your own URL format. This makes it easier to integrate with existing site deployment platforms that offer Image CDN capabilities or to use self-managed Image CDNs by providing a way to generate URLs that are already in format expected by your CDN.
Adapter API now offers ability to provide custom URL generators modules for both Image CDN (gatsbyImage
) and File CDN (publicUrl
). gatsby-adapter-netlify@1.1.0
is optionally using this feature to make use of Netlify’s Image CDN. Be sure to check Netlify Adapter documentation for more information on how to enable and configure it.
Image and File CDN now use remote URLs for source files. It is recommended to only allow certain remote URLs to be used to prevent abuse. This version also introduced a way for source plugins that support Image and File CDN to declare a list of allowed remote URLs with the newly added addRemoteFileAllowedUrl
action. Adapters will receive a list of allowed URLs to automatically configure or guide users on how to configure their deployment to allow those remote URLs.
The latest versions of Gatsby plugins - gatsby-source-contentful
(v8.13.0
), gatsby-source-drupal
(v6.13.0
), and gatsby-source-wordpress
(v7.13.0
) - now incorporate a new action to specify allowed remote URLs. Additionally, gatsby-adapter-netlify
(v1.1.0
) leverages this update to assist in configuring Netlify’s Image CDN. It ensures these remote URLs are permitted and provides informative messages if your netlify.toml
file requires adjustments to support these URLs.
If you are interested in using custom URL generators in your adapter, check the source code of gatsby-adapter-netlify
for a reference implementation:
- registering custom URL generators modules
- custom Image CDN URL generator
- custom File CDN URL generator
Notable bugfixes & improvements
gatsby
:- Disable prettier formatting for autogenerated GraphQL Types, via PR #38453
- Fix API Functions compilation on Windows, via PR #38489
- Fix segmentation faults in DSG/SSR function when mounted in read-only directory, via PR #38631
- Detect when LMDB prebuilt binaries are not used and attempt to use prebuilt binaries in SSR/DSG engine to avoid runtime issues if functions environment is incompatible with binary built from source, via PR #38691
- Add
headerRoutes
to Adapters API to be able to use set of rules for setting headers instead of setting headers for each path individually, via PR #38644 - Handle Path Prefixed paths in Adapter’s Route Manifest, via PR #38666
gatsby-adapter-netlify
:gatsby-source-contentful
:- Multiple packages using
sharp
(image processing library):- Address security vulnerability in used version of
sharp
by upgrading, via PR #38374
- Address security vulnerability in used version of
Contributors
A big Thank You to our community who contributed to this release 💜
- 0o001: fix: GatsbyNodeAPI types PR #38461
- CountryTk: feat(gatsby-plugin-google-tagmanager): add self hosted path option PR #38731
- Hrishikesh-K: chore: added logging for cache handling PR #38654
- axe312ger: fix: contentful delta updates PR #38468
- cunhacf: fix(gatsby): support multiple instances of same variable in gatsbyImage placeholderUrl PR #38626
- derrysucari: fix(gatsby): disable prettier for results of graphql typegen PR #38453
- dhayab: chore(docs): update algolia guide PR #38458
- holtzy: docs: Fix tiny typo (1 letter) PR #38463
- joshuajames: chore(docs): update README.md PR #38495
- jouni: docs: update
npm-cache
directory location PR #38373 - kaltepeter: chore(docs): fix broken eslint doc link in graphql-typegen docs PR #38367
- laurenskling: docs: Update node-model.js to new sort syntax PR #38515
- lovell: chore(deps): upgrade sharp to latest v0.32.6 PR #38374
- palmiak: docs: Changes the name of one of the service PR #38650
- stephan1echung