> For the complete documentation index, see [llms.txt](https://abyss-project.gitbook.io/abyss-storage/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abyss-project.gitbook.io/abyss-storage/setup/thumbnails.md).

# Thumbnails

Each File on Abyss Storage can have multiple thumbnails.

Thumbnail is a preview of a media file in lower resolution for fast loading time.

{% code overflow="wrap" lineNumbers="true" %}

```typescript
// Generate a new Thumbnail
await generateApplicationFileThumbnail(
  {
    applicationId: "application-id",
    applicationFileThumbnailId: "application-file-thumbnail-id",
  },
  {
    x: 256, // Optional
    y: 256, // Optional
    name: "My-New-Thumbnail", // Optional
    customPublicAccessId: "my-custom-public-access" // Option
  },
);

// Refresh thumbnails (in case the origin file changed)
await regenerateApplicationFileThumbnail(
  { applicationId: state.currentApplicationId },
  {
    applicationFileThumbnailId: [
      "application-file-thumbnail-id",
    ],
  },
);

// Download the thumbnail (without Authentication)
await downloadApplicationFileThumbnail({
  applicationFileThumbnailPublicAccessId: "application-file-thumbnail-public-access-id",
});
```

{% endcode %}
