# How to get existed thumbnail path

**URL:** <https://discourse.getcockpit.com/t/how-to-get-existed-thumbnail-path/1330>\
**Category:** Uncategorized\
**Created:** [April 6, 2020, 8:34am UTC](https://discourse.getcockpit.com/t/how-to-get-existed-thumbnail-path/1330 "2020-04-06T08:34:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikobox](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/erikobox/32/555_2.png) [@erikobox](https://discourse.getcockpit.com/u/erikobox)\
**Post date:** [April 6, 2020, 8:34am UTC](https://discourse.getcockpit.com/t/how-to-get-existed-thumbnail-path/1330/1 "2020-04-06T08:34:38Z")

</div>

I see that after I upload the image, cockpit generates thumbnail automatically to show in the admin area.

But when i am trying to fetch the image url of entry using API, i get only the original image url

I found out and tried thumbnail generator cockpit(‘cockpit’)-\>thumbnail($options) but it generates new thumbnail images, i want to get existing thumbs urls and use every time i do api call

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [April 6, 2020, 10:47am UTC](https://discourse.getcockpit.com/t/how-to-get-existed-thumbnail-path/1330/2 "2020-04-06T10:47:04Z")

</div>

If you use the same options a second time, the thumbnail won’t get regenerated. Instead you will receive the url to the previously generated thumb.

If you want more consistent thumb urls, you could give one of these addons a try:

> **[pauloamgomes/ImageStyles](https://github.com/pauloamgomes/ImageStyles)**
>
> Image Styles Cockpit CMS Add-On. Contribute to pauloamgomes/ImageStyles development by creating an account on GitHub.

> **[raffaelj/cockpit\_ImageResize](https://github.com/raffaelj/cockpit_ImageResize)**
>
> Addon for Cockpit CMS to resize uploaded images automatically - raffaelj/cockpit\_ImageResize

---

<div class="post-metadata">

**Author:** ![erikobox](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/erikobox/32/555_2.png) [@erikobox](https://discourse.getcockpit.com/u/erikobox)\
**Post date:** [April 6, 2020, 3:33pm UTC](https://discourse.getcockpit.com/t/how-to-get-existed-thumbnail-path/1330/3 "2020-04-06T15:33:40Z")

</div>

Now I get it, thanks. Please add more info to the documentation, it’s very poor.
