SpaceChop
  • Introduction
  • Configuration
    • Paths
    • Sources
    • Storage
    • Presets
    • Overrides
Powered by GitBook
On this page
  1. Configuration

Paths

PreviousIntroductionNextSources

Last updated 6 years ago

The paths you configure defines the entry points for fetching transformed images from SpaceChop. Under the hood SpaceChop uses to transform the incoming requests URL to a set of parameters that will be used to fetch and transform the original image.

You can use to play around with different type of paths to see which parameters they resolve to. Make sure to use package version 2.0.0 to get the appropriate results.

If you require multiple different paths that are very different you can define several paths in the configuration.

Examples

config.yml
paths:
  # ex. https://example.com/images/t_thumb/cat.jpeg
  - /images/:preset/:image
  
  # If originals are stored without an extension but you want
  # to fetch them with an extension
  # ex. https://example.com/image/cat.jpeg
  - /images/:preset/:image(\w+).(.*)
path-to-regex
http://forbeslindesay.github.io/express-route-tester/