<p>I need to develop a plugin where the user can modify his pictures (assets) on the fly. I've already done that in another PHP project and am willing to port it on craft, but I cant find any way on how to access assets, and what's the best way of doing it.</p>

<ul>
<li>First, I want my plugin to act on <strong>asset sources</strong>, like you enable it or not.</li>
<li>Then, I want to add a button in the small window that opens up when you double click an asset (in an entry for example), how can one achieve this ?</li>
</ul>

<p>Thanks a lot !</p>

<p><strong>Edit</strong>
Usecase : I have an image gallery, where albums are a structure, and you can add images in any of them. New albums can be added by other users. When they double click a picture in the entry editor, I'd like to display a button that says something like "edit" (under the default options). I tried using a new field type but it's not the good and legit solution I guess.</p>

<p>When the button is clicked, they are brought to a new page (still in CP) where they can edit their picture (I did the editor in javascript), then save it.</p>

CC BY-SA 3.0
2015-09-25T20:38:12.727Z
This question is very imprecise (and probably too broad, as well). Can you be more specific? What do you mean by "modify assets on the fly" and "act on asset sources"?
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2015-09-25T22:30:46.360Z
Possibly a duplicate of [this question...](https://craftcms.stackexchange.com/questions/454/how-do-we-create-a-pre-defined-asset-upload-field-in-a-plugin-that-integrates-wi/456#456) If you have something more specific to address, which isn't covered by that other thread, then please edit your question to hone in on a specific issue.
Lindsey D
CC BY-SA 3.0
2015-09-26T06:30:33.383Z
hey thanks for your help ! I edited my question
ovesco
<plugin-development><assets><control-panel>
Plugin access assets directly in CP
# Plugin access assets directly in CP

(Asked by: username_0 on 2015-09-25)

I need to develop a plugin where the user can modify his pictures (assets) on the fly. I've already done that in another PHP project and am willing to port it on craft, but I cant find any way on how to access assets, and what's the best way of doing it.

* First, I want my plugin to act on **asset sources**, like you enable it or not.
* Then, I want to add a button in the small window that opens up when you double click an asset (in an entry for example), how can one achieve this ?

Thanks a lot !

**Edit**
Usecase : I have an image gallery, where albums are a structure, and you can add images in any of them. New albums can be added by other users. When they double click a picture in the entry editor, I'd like to display a button that says something like "edit" (under the default options). I tried using a new field type but it's not the good and legit solution I guess.

When the button is clicked, they are brought to a new page (still in CP) where they can edit their picture (I did the editor in javascript), then save it.

**Tags:** plugin-development, assets, control-panel

> **Comments:**
> **username_1**: This question is very imprecise (and probably too broad, as well). Can you be more specific? What do you mean by "modify assets on the fly" and "act on asset sources"?  
> **username_2**: Possibly a duplicate of [this question...](https://craftcms.stackexchange.com/questions/454/how-do-we-create-a-pre-defined-asset-upload-field-in-a-plugin-that-integrates-wi/456#456) If you have something more specific to address, which isn't covered by that other thread, then please edit your question to hone in on a specific issue.  
> **username_0**: hey thanks for your help ! I edited my question  

---

## 0 answers

