# What's the best approach to showing layer thumbnails in a UXP plugin ui?

**URL:** <https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070>\
**Category:** UXP Plugin API\
**Tags:** ui, uxp, javascript\
**Created:** [November 6, 2023, 1:43am UTC](https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070 "2023-11-06T01:43:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![datboi](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@datboi](https://forums.creativeclouddeveloper.com/u/datboi)\
**Post date:** [November 6, 2023, 1:43am UTC](https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070/1 "2023-11-06T01:43:08Z")

</div>

I’m building a UXP plugin and want to show thumbnails in the UI, for layers, masks and channels.

So far, I can’t find a direct way to access layer/channel/mask thumbnails (layer previews). I kind of assumed they wouldn’t be accessible, but I’m holding out hope that I’m wrong about that.

My other solution is exporting small thumbnails periodically or on some trigger and rendering them in the UI.

Wondering if anyone else has considered this or has approached something similar and can share any info. Some way of getting some usable data from temp or any other tricks?

---

<div class="post-metadata">

**Author:** ![datboi](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@datboi](https://forums.creativeclouddeveloper.com/u/datboi)\
**Post date:** [November 8, 2023, 1:48am UTC](https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070/2 "2023-11-08T01:48:23Z")

</div>

Update: Got a version working using the imaging api. Haven’t pushed it but it seems to do what I need without any performance issues so far.

---

<div class="post-metadata">

**Author:** ![maxplaystudios](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@maxplaystudios](https://forums.creativeclouddeveloper.com/u/maxplaystudios)\
**Post date:** [November 9, 2023, 7:24pm UTC](https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070/3 "2023-11-09T19:24:32Z")

</div>

Can you please post a bit of code to share? I’m interested in using that for an internal plugin at work…

---

<div class="post-metadata">

**Author:** ![jsbache](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jsbache](https://forums.creativeclouddeveloper.com/u/jsbache)\
**Post date:** [November 10, 2023, 12:05am UTC](https://forums.creativeclouddeveloper.com/t/whats-the-best-approach-to-showing-layer-thumbnails-in-a-uxp-plugin-ui/7070/4 "2023-11-10T00:05:25Z")

</div>

Maybe do this:  
Download the imaging-test plugin from the bottom of:  
[https://developer.adobe.com/photoshop/uxp/2022/ps\_reference/media/imaging/](https://developer.adobe.com/photoshop/uxp/2022/ps_reference/media/imaging/)

Then open main.js and look for “function getImageThumbnail()”.  
That method will get a layer thumbnail if you provide a layerID
