Storyblok · Capability

Storyblok Image Service — Image Transformation

Storyblok Image Service — Image Transformation. 4 operations. Lead operation: Retrieve original image with transformation routing enabled. Self-contained Naftiko capability covering one Storyblok business surface.

Run with Naftiko StoryblokImage Transformation

What You Can Do

GET
Getoriginalimage — Retrieve original image with transformation routing enabled
/v1/{asset-path}/m
GET
Fitinimage — Fit image within specified dimensions without cropping
/v1/{asset-path}/m/fit-in/{width-x-height}
GET
Resizeimage — Resize an image to specified dimensions
/v1/{asset-path}/m/{width-x-height}
GET
Transformimagewithfilters — Transform image with resize and filter chain
/v1/{asset-path}/m/{width-x-height}/filters-filter-chain

MCP Tools

retrieve-original-image-transformation-routing

Retrieve original image with transformation routing enabled

read-only idempotent
fit-image-within-specified-dimensions

Fit image within specified dimensions without cropping

read-only idempotent
resize-image-specified-dimensions

Resize an image to specified dimensions

read-only idempotent
transform-image-resize-and-filter

Transform image with resize and filter chain

read-only idempotent

Capability Spec

image-service-image-transformation.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Storyblok Image Service — Image Transformation
  description: 'Storyblok Image Service — Image Transformation. 4 operations. Lead operation: Retrieve original image with
    transformation routing enabled. Self-contained Naftiko capability covering one Storyblok business surface.'
  tags:
  - Storyblok
  - Image Transformation
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STORYBLOK_API_KEY: STORYBLOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: image-service-image-transformation
    baseUri: https://img2.storyblok.com
    description: Storyblok Image Service — Image Transformation business capability. Self-contained, no shared references.
    resources:
    - name: asset_path-m
      path: /{asset_path}/m/
      operations:
      - name: getoriginalimage
        method: GET
        description: Retrieve original image with transformation routing enabled
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: asset_path-m-fit-in-width}x{height
      path: /{asset_path}/m/fit-in/{width}x{height}
      operations:
      - name: fitinimage
        method: GET
        description: Fit image within specified dimensions without cropping
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: width
          in: path
          type: integer
          description: Maximum width in pixels for the fit-in operation.
          required: true
        - name: height
          in: path
          type: integer
          description: Maximum height in pixels for the fit-in operation.
          required: true
    - name: asset_path-m-width}x{height
      path: /{asset_path}/m/{width}x{height}
      operations:
      - name: resizeimage
        method: GET
        description: Resize an image to specified dimensions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: width
          in: path
          type: integer
          description: Target width in pixels. Set to 0 to scale proportionally based on height.
          required: true
        - name: height
          in: path
          type: integer
          description: Target height in pixels. Set to 0 to scale proportionally based on width.
          required: true
    - name: asset_path-m-width}x{height-filters:{filter_chain}
      path: /{asset_path}/m/{width}x{height}/filters:{filter_chain}
      operations:
      - name: transformimagewithfilters
        method: GET
        description: Transform image with resize and filter chain
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: width
          in: path
          type: integer
          description: Target width in pixels. Set to 0 for proportional scaling.
          required: true
        - name: height
          in: path
          type: integer
          description: Target height in pixels. Set to 0 for proportional scaling.
          required: true
        - name: filter_chain
          in: path
          type: string
          description: 'Colon-separated chain of filter function calls to apply to the image. Each filter is specified as
            name(value). For example: format(webp):quality(80):fill(transp'
          required: true
  exposes:
  - type: rest
    namespace: image-service-image-transformation-rest
    port: 8080
    description: REST adapter for Storyblok Image Service — Image Transformation. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/{asset-path}/m
      name: asset-path-m
      description: REST surface for asset_path-m.
      operations:
      - method: GET
        name: getoriginalimage
        description: Retrieve original image with transformation routing enabled
        call: image-service-image-transformation.getoriginalimage
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{asset-path}/m/fit-in/{width-x-height}
      name: asset-path-m-fit-in-width-x-height
      description: REST surface for asset_path-m-fit-in-width}x{height.
      operations:
      - method: GET
        name: fitinimage
        description: Fit image within specified dimensions without cropping
        call: image-service-image-transformation.fitinimage
        with:
          width: rest.width
          height: rest.height
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{asset-path}/m/{width-x-height}
      name: asset-path-m-width-x-height
      description: REST surface for asset_path-m-width}x{height.
      operations:
      - method: GET
        name: resizeimage
        description: Resize an image to specified dimensions
        call: image-service-image-transformation.resizeimage
        with:
          width: rest.width
          height: rest.height
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{asset-path}/m/{width-x-height}/filters-filter-chain
      name: asset-path-m-width-x-height-filters-filter-chain
      description: REST surface for asset_path-m-width}x{height-filters:{filter_chain}.
      operations:
      - method: GET
        name: transformimagewithfilters
        description: Transform image with resize and filter chain
        call: image-service-image-transformation.transformimagewithfilters
        with:
          width: rest.width
          height: rest.height
          filter_chain: rest.filter_chain
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: image-service-image-transformation-mcp
    port: 9090
    transport: http
    description: MCP adapter for Storyblok Image Service — Image Transformation. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: retrieve-original-image-transformation-routing
      description: Retrieve original image with transformation routing enabled
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: image-service-image-transformation.getoriginalimage
      outputParameters:
      - type: object
        mapping: $.
    - name: fit-image-within-specified-dimensions
      description: Fit image within specified dimensions without cropping
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: image-service-image-transformation.fitinimage
      with:
        width: tools.width
        height: tools.height
      outputParameters:
      - type: object
        mapping: $.
    - name: resize-image-specified-dimensions
      description: Resize an image to specified dimensions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: image-service-image-transformation.resizeimage
      with:
        width: tools.width
        height: tools.height
      outputParameters:
      - type: object
        mapping: $.
    - name: transform-image-resize-and-filter
      description: Transform image with resize and filter chain
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: image-service-image-transformation.transformimagewithfilters
      with:
        width: tools.width
        height: tools.height
        filter_chain: tools.filter_chain
      outputParameters:
      - type: object
        mapping: $.