Stashr

Stashr docs

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

Upload Optimization

Upload optimization controls what Stashr stores when an image is added. Public URL transforms are a separate delivery feature.

Upload Settings

Set the default WebP compression quality in Settings. Stashr sends this quality to ManxMedia for optimized image uploads. Non-image files are stored as accepted by the media service.

Settings can also default image uploads to keep original files. Dashboard uploads still show a per-upload switch, and API uploads can override the default with storeOriginalImages=true or storeOriginalImages=false.

Keeping originals creates original and optimized stored variants in the selected folder. Original copies keep their source format; optimized copies use the default ManxMedia profile. Asset responses group both files into one logical asset with a variants array.

Manage Settings Through The API

An API key with assets:read can inspect the workspace default:

const baseUrl = "https://stashr.dev";
const apiKey = process.env.STASHR_API_KEY;
const projectId = process.env.STASHR_PROJECT_ID || "";
const folderId = process.env.STASHR_FOLDER_ID || "";
const assetId = process.env.STASHR_ASSET_ID || "";
const authHeaders = { Authorization: "Bearer " + apiKey };
const response = await fetch(baseUrl + "/api/v1/settings/optimization", {
  method: "GET",
  headers: authHeaders
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

An API key with assets:write can update either or both editable settings:

const payload = {
  "quality": 82,
  "storeOriginalImages": true
};

const response = await fetch(baseUrl + "/api/v1/settings/optimization", {
  method: "PATCH",
  headers: { ...authHeaders, "Content-Type": "application/json" },
  body: JSON.stringify(payload)
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

The current upload profile stores optimized images as WebP with maximum dimensions of 2400 by 2400.

Delivery Is Separate

To resize or convert a published image without changing storage, use its public delivery URL. See Image transforms.