immich-app/immich · warning · BadRequestException
Editing panorama images is not supported
Error message
Editing panorama images is not supported
What it means
Thrown by editAsset when isPanorama(asset) is true. Per server/src/utils/asset.util.ts, isPanorama returns true when projectionType === 'EQUIRECTANGULAR' or the originalFileName ends with '.insp' (Insta360). Panoramas need a spherical viewer and cannot be cropped/rotated as flat images, so the editor rejects them with 400 BadRequest.
Source
Thrown at server/src/services/asset.service.ts:544
async editAsset(auth: AuthDto, id: string, dto: AssetEditsCreateDto): Promise<AssetEditsResponseDto> {
await this.requireAccess({ auth, permission: Permission.AssetEditCreate, ids: [id] });
const asset = await this.assetRepository.getForEdit(id);
if (!asset) {
throw new BadRequestException('Asset not found');
}
if (asset.type !== AssetType.Image) {
throw new BadRequestException('Only images can be edited');
}
if (asset.livePhotoVideoId) {
throw new BadRequestException('Editing live photos is not supported');
}
if (isPanorama(asset)) {
throw new BadRequestException('Editing panorama images is not supported');
}
if (asset.originalPath?.toLowerCase().endsWith('.gif')) {
throw new BadRequestException('Editing GIF images is not supported');
}
if (asset.originalPath?.toLowerCase().endsWith('.svg')) {
throw new BadRequestException('Editing SVG images is not supported');
}
// check that crop parameters will not go out of bounds
const { width: assetWidth, height: assetHeight } = getDimensions(asset);
if (!assetWidth || !assetHeight) {
throw new BadRequestException('Asset dimensions are not available for editing');
}
const edits = dto.edits as AssetEditActionItem[];View on GitHub (pinned to 199723261c)
Solutions
- Hide/disable the flat editor when asset.projectionType === 'EQUIRECTANGULAR' or the filename ends with '.insp'.
- Route panoramic assets to a spherical viewer instead.
- Strip/normalize projectionType only if you intentionally want flat editing (not recommended).
Example fix
// before
const isPanorama = false;
// after
const isPanorama =
asset.projectionType === 'EQUIRECTANGULAR' ||
asset.originalFileName.toLowerCase().endsWith('.insp');
const editable = asset.type === 'IMAGE' && !asset.livePhotoVideoId && !isPanorama; Defensive patterns
Strategy: validation
Validate before calling
const isPanorama =
asset.projectionType === 'EQUIRECTANGULAR' ||
(asset.originalFileName ?? '').toLowerCase().endsWith('.insp');
if (isPanorama) {
throw new Error('Panoramas cannot be edited as flat images.');
} Type guard
function isPanoramic(a: { projectionType?: string | null; originalFileName?: string }): boolean {
return (
a?.projectionType === 'EQUIRECTANGULAR' ||
(a?.originalFileName ?? '').toLowerCase().endsWith('.insp')
);
} Prevention
- Mirror the server's isPanorama rule exactly on the client.
- Route equirectangular/.insp assets to a spherical viewer.
- Re-check projectionType after metadata extraction completes.
When it happens
Trigger: PUT /assets/{id}/edits on a 360° equirectangular panorama or an Insta360 .insp image.
Common situations: User has a 360 camera library; client surfaces a normal edit button on panoramic assets; metadata extraction set projectionType='EQUIRECTANGULAR' from XMP/GPano data.
Related errors
- Only images can be edited
- Editing GIF images is not supported
- Editing SVG images is not supported
- Asset dimensions are not available for editing
- Editing live photos is not supported
AI-assisted analysis of immich-app/immich@199723261c (2026-08-12).
Data as JSON: /api/errors/e6bd553925d74cb9.
Report an issue: GitHub.