## TL;DR

You first have to fetch a list of all the images of the document with GET /v1/files/PROJECT_HASH.

## Fix

1. You first have to fetch a list of all the images of the document with GET /v1/files/PROJECT_HASH.
   Expected: you can confirm this matches your situation.

## When to use

- You are dealing with this situation.
- The symptom matches: How to get the original image file type (png, jpg, etc.) of an image?.

## When NOT to use

- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported per the linked source.

## Variant phrasings

### How to get the original image file type (png, jpg, etc.) of an image?

## Why it happens

Stack Overflow question (score 0, has accepted answer): I am trying to export images used in layers. The image fills API (GET/v1/files/:key/images) returns a map of [ imageRef , URL ] but there's no way to know the image file type. For example, the URL doesn't have the file type. This is kind of a show stopper :( Ideally, I'd like to know the original file name and type(the actual image which the designer browsed), but just the file type is OK

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.