Stashr

Stashr docs

API access, projects, uploads, clean links, transforms, usage, and billing.

Image Transforms

Image transforms are public delivery URL parameters. They are not /api/v1 management requests and do not use an API key.

Start with the deliveryUrl returned by an asset response:

/acme/website/brand/hero.optimized.webp

Prefix it with the Stashr origin and add transform parameters:

https://stashr.dev/acme/website/brand/hero.optimized.webp?w=1200&format=webp&q=82

Parameters

ParameterValuesDefault
wInteger from 1 to 4096Source width
hInteger from 1 to 4096Source height
fitcover, contain, fill, inside, outsidecover
formatavif, jpeg, png, webpwebp
qInteger from 1 to 10082

Only the short parameter names are supported. width, height, and quality are not aliases.

Stashr never enlarges an image beyond its source dimensions. When both dimensions are provided, fit controls how the image is placed in the requested box.

Examples

UseURL parameters
Square thumbnail?w=240&h=240&fit=cover&format=webp&q=78
Contained product image?w=800&h=600&fit=contain&format=webp&q=82
Responsive card?w=640&format=avif&q=80
JPEG preview?w=1600&format=jpeg&q=90

Responsive HTML:

<img
  src="https://stashr.dev/acme/website/brand/hero.optimized.webp?w=800&format=webp&q=82"
  srcset="
    https://stashr.dev/acme/website/brand/hero.optimized.webp?w=480&format=webp&q=80 480w,
    https://stashr.dev/acme/website/brand/hero.optimized.webp?w=800&format=webp&q=82 800w,
    https://stashr.dev/acme/website/brand/hero.optimized.webp?w=1400&format=webp&q=84 1400w
  "
  sizes="(max-width: 700px) 100vw, 700px"
  alt="Product dashboard"
/>

Delivery Behavior

  • Transforms work only for image assets. Transform parameters on PDFs, audio, video, or other files return 400.
  • A transformed response is generated on demand and is not added to the asset library as a new stored asset.
  • Every distinct transform URL can be used directly in HTML, CSS, email, or another public client.
  • Transformed bytes count toward the workspace delivery allowance.
  • Delivery URLs are public and unlisted. Anyone with the URL can request the asset.
  • Public delivery pauses when the workspace has exhausted both its monthly allowance and prepaid delivery.

Upload Optimization Is Separate

Upload optimization decides what Stashr stores when an image is added. The workspace quality and storeOriginalImages settings apply during upload.

URL transforms decide what Stashr returns for one delivery request. They do not change the stored asset, its metadata, or the upload settings.