Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

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.

Previous release notes

Full changelog


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:

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:
    • Support Path Prefix and Trailing Slash options, via PR #38666
    • Support force and conditions redirect parameters, via PR #38657
    • Use headerRoutes if available to produce smaller _headers file, via PR #38652
  • gatsby-source-contentful:
    • Properly configure sync options for incremental data update, via PR #38468
    • Fix handling of “Long text” fields during incremental data updata, via PR #38728
  • Multiple packages using sharp (image processing library):
    • Address security vulnerability in used version of sharp by upgrading, via PR #38374

Contributors

A big Thank You to our community who contributed to this release 💜

Start building today on Netlify!
Edit this page on GitHub
© 2023 Gatsby, Inc.